Exemplo n.º 1
0
        /// <summary>
        /// </summary>
        /// <returns>Docking station event</returns>
        public DockingStationEvent Execute()
        {
            Stopwatch stopwatch = Log.TimingBegin("DATALOG CLEAR");

            InstrumentDatalogClearEvent datalogClearEvent = new InstrumentDatalogClearEvent(this);

            datalogClearEvent.DockedInstrument = (ISC.iNet.DS.DomainModel.Instrument)Master.Instance.SwitchService.Instrument.Clone();
            datalogClearEvent.DockingStation   = Master.Instance.ControllerWrapper.GetDockingStation();

            using (InstrumentController instrumentController = Master.Instance.SwitchService.InstrumentController)
            {
                instrumentController.Initialize();
                datalogClearEvent.SessionsCleared = 0;
                datalogClearEvent.SessionsCleared = instrumentController.ClearDatalog();
            } // end-using

            Log.TimingEnd("DATALOG CLEAR", stopwatch);

            return(datalogClearEvent);
        }