public void EndScope() { this.CheckDisposed(); using (this._scopeLock.BeginWriteLockScope()) { this._scope = null; } }
private AsyncCmdletScope BeginAsyncScope() { using (this._scopeLock.BeginWriteLockScope()) { if (this._scope != null) { throw new InvalidOperationException(); } this._scope = new AsyncCmdletScope(this); return(this._scope); } }
public QueueingSynchronizationContext( [NotNull] AsyncCmdletScope scope) { this._scope = scope; this._cancellationToken = scope.CancellationToken; }