Пример #1
0
 /// <summary>
 /// Initializes the Module to a working state.
 /// </summary>
 public void Initialize()
 {
     InternalModuleState  = ModuleState.Initializing;
     InternalModuleStatus = ModuleStatusConstants.Initializing;
     try
     {
         InternalInitialize();
         if (IsAutoPollingModule)
         {
             ModulePollingThread = ThreadUtility.CreateThread(PollingThreadStart);
         }
         InternalModuleState  = ModuleState.Healthy;
         InternalModuleStatus = ModuleStatusConstants.Initialized;
     }
     catch (Exception ex)
     {
         InternalModuleState  = ModuleState.Error;
         InternalModuleStatus = String.Format("{0}\r\n{1}", ModuleStatusConstants.InitializeError, ex.Message);
     }
 }
Пример #2
0
 protected override void Because_Of()
 {
     _thread = ThreadUtility.CreateThread(testedClass.Poll, "Poll Thread");
 }
Пример #3
0
 protected override void Because_Of()
 {
     _thread = ThreadUtility.CreateThread(_testedClass.Dispose);
 }
Пример #4
0
 protected override void Because_Of()
 {
     _thread = ThreadUtility.CreateThread(new ThreadStart(_testedClass.Initialize), "");
 }
Пример #5
0
 protected override void Because_Of()
 {
     Thread = ThreadUtility.CreateThread(TestParameterizedThreadStart, _threadName, false);
 }
Пример #6
0
 protected override void Because_Of()
 {
     Thread = ThreadUtility.CreateThread(TestThreadStart, _threadName);
 }