Exemplo n.º 1
0
        public void EndScope()
        {
            this.CheckDisposed();

            using (this._scopeLock.BeginWriteLockScope())
            {
                this._scope = null;
            }
        }
Exemplo n.º 2
0
        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;
 }