コード例 #1
0
            public void InvokeFromToken(IValueContainer valueContainer, IDisposableTreeHandleable owner)
            {
                // Disposing the owner sets _callback to null, so copy to stack first.
                var callback = _callback;

                owner.Dispose();
                callback.Invoke(new ReasonContainer(valueContainer));
            }
コード例 #2
0
 public void InvokeFromToken(IValueContainer valueContainer, IDisposableTreeHandleable owner)
 {
     // When token is canceled, don't invoke the callback.
     if (_valueContainer != null)
     {
         // Owner is in the event queue, just release the container.
         _valueContainer.Release();
         _valueContainer = null;
     }
     else
     {
         _previous.Remove(owner);
         owner.Dispose();
     }
 }
コード例 #3
0
 public void InvokeFromToken(IValueContainer valueContainer, IDisposableTreeHandleable owner)
 {
     throw new System.InvalidOperationException();
 }