예제 #1
0
		public override void SuspendJobAsync(bool force, string reason)
		{
			this.AssertNotDisposed();
			this._tracer.WriteMessage("PSWorkflowJob", "SuspendJobAsync", this.WorkflowGuidForTraces, this, "", new string[0]);
			AsyncOperation asyncOperation = AsyncOperationManager.CreateOperation(null);
			PSWorkflowJob.JobActionWorkerDelegate jobActionWorkerDelegate = new PSWorkflowJob.JobActionWorkerDelegate(this.JobActionWorker);
			PSWorkflowJob.ActionType actionType = PSWorkflowJob.ActionType.Suspend;
			if (force)
			{
				actionType = PSWorkflowJob.ActionType.Abort;
			}
			jobActionWorkerDelegate.BeginInvoke(asyncOperation, actionType, reason, string.Empty, null, null);
		}
예제 #2
0
		private void DoStartJobAsync(object state)
		{
			this._tracer.WriteMessage("PSWorkflowJob", "DoStartJobAsync", this.WorkflowGuidForTraces, this, "", new string[0]);
			AsyncOperation asyncOperation = AsyncOperationManager.CreateOperation(null);
			PSWorkflowJob.JobActionWorkerDelegate jobActionWorkerDelegate = new PSWorkflowJob.JobActionWorkerDelegate(this.JobActionWorker);
			jobActionWorkerDelegate.BeginInvoke(asyncOperation, PSWorkflowJob.ActionType.Start, string.Empty, string.Empty, null, null);
		}
예제 #3
0
		public override void StopJobAsync()
		{
			this.AssertNotDisposed();
			this._tracer.WriteMessage("PSWorkflowJob", "StopJobAsync", this.WorkflowGuidForTraces, this, "", new string[0]);
			AsyncOperation asyncOperation = AsyncOperationManager.CreateOperation(null);
			PSWorkflowJob.JobActionWorkerDelegate jobActionWorkerDelegate = new PSWorkflowJob.JobActionWorkerDelegate(this.JobActionWorker);
			jobActionWorkerDelegate.BeginInvoke(asyncOperation, PSWorkflowJob.ActionType.Stop, string.Empty, string.Empty, null, null);
		}