internal void RaiseWmiOperationState(EventArgs baseEventArgs, WmiState state)
        {
            WmiJobStateEventArgs wmiJobStateEventArg = new WmiJobStateEventArgs();

            wmiJobStateEventArg.WmiState = state;
            this.WmiOperationState.SafeInvoke <WmiJobStateEventArgs>(this, wmiJobStateEventArg);
        }
Beispiel #2
0
 private void HandleWMIState(object sender, WmiJobStateEventArgs stateEventArgs)
 {
     if (stateEventArgs.WmiState != WmiState.Running)
     {
         if (stateEventArgs.WmiState != WmiState.NotStarted)
         {
             if (stateEventArgs.WmiState != WmiState.Completed)
             {
                 if (stateEventArgs.WmiState != WmiState.Failed)
                 {
                     base.SetJobState(JobState.Stopped, this.helper.InternalException);
                     return;
                 }
                 else
                 {
                     base.SetJobState(JobState.Failed, this.helper.InternalException);
                     return;
                 }
             }
             else
             {
                 base.SetJobState(JobState.Completed);
                 return;
             }
         }
         else
         {
             base.SetJobState(JobState.NotStarted, this.helper.InternalException);
             return;
         }
     }
     else
     {
         base.SetJobState(JobState.Running, this.helper.InternalException);
         return;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Handles WMI state changed
 /// </summary>
 private void HandleWMIState(object sender, WmiJobStateEventArgs stateEventArgs)
 {
     if (stateEventArgs.WmiState == WmiState.Running)
     {
         SetJobState(JobState.Running, _helper.InternalException);
     }
     else if (stateEventArgs.WmiState == WmiState.NotStarted)
     {
         SetJobState(JobState.NotStarted, _helper.InternalException);
     }
     else if (stateEventArgs.WmiState == WmiState.Completed)
     {
         SetJobState(JobState.Completed);
     }
     else if (stateEventArgs.WmiState == WmiState.Failed)
     {
         SetJobState(JobState.Failed, _helper.InternalException);
     }
     else
     {
         SetJobState(JobState.Stopped, _helper.InternalException);
     }
 }
Beispiel #4
0
        } // RaiseOperationCompleteEvent

        ///<summary>
        /// Raise WMI state changed event
        ///</summary>
        internal void RaiseWmiOperationState(EventArgs baseEventArgs, WmiState state)
        {
            WmiJobStateEventArgs wmiJobStateEventArgs = new WmiJobStateEventArgs();
            wmiJobStateEventArgs.WmiState = state;
            WmiOperationState.SafeInvoke(this, wmiJobStateEventArgs);
        }
Beispiel #5
0
		private void HandleWMIState(object sender, WmiJobStateEventArgs stateEventArgs)
		{
			if (stateEventArgs.WmiState != WmiState.Running)
			{
				if (stateEventArgs.WmiState != WmiState.NotStarted)
				{
					if (stateEventArgs.WmiState != WmiState.Completed)
					{
						if (stateEventArgs.WmiState != WmiState.Failed)
						{
							base.SetJobState(JobState.Stopped, this.helper.InternalException);
							return;
						}
						else
						{
							base.SetJobState(JobState.Failed, this.helper.InternalException);
							return;
						}
					}
					else
					{
						base.SetJobState(JobState.Completed);
						return;
					}
				}
				else
				{
					base.SetJobState(JobState.NotStarted, this.helper.InternalException);
					return;
				}
			}
			else
			{
				base.SetJobState(JobState.Running, this.helper.InternalException);
				return;
			}
		}