/// <summary> /// Starts the request asynchronously and immediately returns control to the caller. /// </summary> /// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception> private void ExecuteAsync(BuildSubmissionCompleteCallback callback, object context, bool allowMainThreadBuild) { ErrorUtilities.VerifyThrowInvalidOperation(!IsCompleted, "SubmissionAlreadyComplete"); _completionCallback = callback; AsyncContext = context; BuildManager.ExecuteSubmission(this, allowMainThreadBuild); }
public void ExecuteAsync(BuildSubmissionCompleteCallback callback, object context) { if (is_completed) { throw new InvalidOperationException("Build has already completed"); } if (is_canceled) { throw new InvalidOperationException("Build has already canceled"); } if (is_started) { throw new InvalidOperationException("Build has already started"); } is_started = true; this.AsyncContext = context; this.callback = callback; wait_handle.Reset(); BuildManager.BuildNodeManager.Enqueue(this); }
/// <summary> /// Starts the request asynchronously and immediately returns control to the caller. /// </summary> /// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception> public void ExecuteAsync(BuildSubmissionCompleteCallback callback, object context) { ExecuteAsync(callback, context, false); }
public void ExecuteAsync (BuildSubmissionCompleteCallback callback, object context) { if (is_completed) throw new InvalidOperationException ("Build has already completed"); if (is_canceled) throw new InvalidOperationException ("Build has already canceled"); if (is_started) throw new InvalidOperationException ("Build has already started"); is_started = true; this.AsyncContext = context; this.callback = callback; wait_handle.Reset (); BuildManager.BuildNodeManager.Enqueue (this); }