Example #1
0
        public override void Initialize()
        {
            switch (Option.Mode)
            {
            case RunMode.Full:
                ConfigurationManager = new PlatformConfigManager();
                LogService           = new LogService();
                ParameterChecker     = new ParameterChecker.ParameterChecker();
                ResultManager        = new ResultManager.ResultManager();
                ComInterfaceManager  = new InterfaceManager();
                SequenceManager      = new SequenceManager.SequenceManager();
                DataMaintainer       = new DataMaintainer.DataMaintainer();
                EngineController     = new EngineHandle();
                DesignTimeService    = new DesignTimeService();
                RuntimeService       = new RuntimeService.RuntimeService();
                break;

            case RunMode.Minimal:
                ConfigurationManager = new PlatformConfigManager();
                LogService           = new LogService();
                ResultManager        = new ResultManager.ResultManager();
                SequenceManager      = new SequenceManager.SequenceManager();
                DataMaintainer       = new DataMaintainer.DataMaintainer();
                EngineController     = new EngineHandle();
                RuntimeService       = new RuntimeService.RuntimeService();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Example #2
0
 /// <summary>
 /// 运行时初始化
 /// </summary>
 public virtual void RuntimeInitialize()
 {
     DesignTimeService?.Deactivate();
     ConfigurationManager.RuntimeInitialize();
     LogService.RuntimeInitialize();
     ResultManager.RuntimeInitialize();
     SequenceManager.RuntimeInitialize();
     DataMaintainer.RuntimeInitialize();
     EngineController.RuntimeInitialize();
     RuntimeService.Activate();
 }
Example #3
0
 /// <summary>
 /// 设计时初始化
 /// </summary>
 public virtual void DesigntimeInitialize()
 {
     RuntimeService.Deactivate();
     ConfigurationManager.DesigntimeInitialize();
     LogService.DesigntimeInitialize();
     ParameterChecker.DesigntimeInitialize();
     ResultManager.DesigntimeInitialize();
     ComInterfaceManager.DesigntimeInitialize();
     SequenceManager.DesigntimeInitialize();
     DataMaintainer.DesigntimeInitialize();
     EngineController.DesigntimeInitialize();
     DesignTimeService.Activate();
 }
Example #4
0
 /// <summary>
 /// 销毁当前Runner
 /// </summary>
 public virtual void Dispose()
 {
     _runnerInst = null;
     DesignTimeService?.Dispose();
     RuntimeService?.Dispose();
     EngineController?.Dispose();
     DataMaintainer?.Dispose();
     SequenceManager?.Dispose();
     ComInterfaceManager?.Dispose();
     ResultManager?.Dispose();
     ParameterChecker?.Dispose();
     LogService?.Dispose();
     ConfigurationManager?.Dispose();
 }