コード例 #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);
 }