Exemplo n.º 1
0
 /// <summary>
 /// Disposes of any resources held by the <see cref="DrawingContext"/>.
 /// </summary>
 public void Dispose()
 {
     while (_states.Count != 0)
     {
         _states.Peek().Dispose();
     }
     StateStackPool.Push(_states);
     _states = null;
     TransformStackPool.Push(_transformContainers);
     _transformContainers = null;
     PlatformImpl.Dispose();
 }
Exemplo n.º 2
0
 internal void Close(bool ignoreCancel)
 {
     try
     {
         if (!ignoreCancel && HandleClosing())
         {
             return;
         }
     }
     finally
     {
         PlatformImpl?.Dispose();
         HandleClosed();
     }
 }
Exemplo n.º 3
0
        internal void Close(bool ignoreCancel)
        {
            var cancelClosing = false;

            try
            {
                cancelClosing = HandleClosing();
            }
            finally
            {
                if (ignoreCancel || !cancelClosing)
                {
                    PlatformImpl?.Dispose();
                    HandleClosed();
                }
            }
        }
Exemplo n.º 4
0
        internal void Close(bool ignoreCancel)
        {
            var cancelClosing = false;

            try
            {
                cancelClosing = HandleClosing();
            }
            finally
            {
                if (ignoreCancel || !cancelClosing)
                {
                    s_windows.Remove(this);
                    PlatformImpl?.Dispose();
                    IsVisible = false;
                }
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Disposes of any resources held by the <see cref="DrawingContext"/>.
 /// </summary>
 public void Dispose()
 {
     while (_states.Count != 0)
     {
         _states.Peek().Dispose();
     }
     StateStackPool.Return(_states);
     _states = null;
     if (_transformContainers.Count != 0)
     {
         throw new InvalidOperationException("Transform container stack is non-empty");
     }
     TransformStackPool.Return(_transformContainers);
     _transformContainers = null;
     if (_ownsImpl)
     {
         PlatformImpl.Dispose();
     }
 }
Exemplo n.º 6
0
        internal void Close(bool ignoreCancel)
        {
            bool close = true;

            try
            {
                if (!ignoreCancel && HandleClosing())
                {
                    close = false;
                    return;
                }
            }
            finally
            {
                if (close)
                {
                    PlatformImpl?.Dispose();
                }
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// Disposes of any resources held by the <see cref="DrawingContext"/>.
 /// </summary>
 public void Dispose()
 {
     if (_states is null || _transformContainers is null)
     {
         throw new ObjectDisposedException(nameof(DrawingContext));
     }
     while (_states.Count != 0)
     {
         _states.Peek().Dispose();
     }
     StateStackPool.Return(_states);
     _states = null;
     if (_transformContainers.Count != 0)
     {
         throw new InvalidOperationException("Transform container stack is non-empty");
     }
     TransformStackPool.Return(_transformContainers);
     _transformContainers = null;
     if (_ownsImpl)
     {
         PlatformImpl.Dispose();
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Closes the window.
 /// </summary>
 public void Close()
 {
     PlatformImpl.Dispose();
 }
Exemplo n.º 9
0
 /// <summary>
 /// Closes the window.
 /// </summary>
 public void Close()
 {
     s_windows.Remove(this);
     PlatformImpl?.Dispose();
     IsVisible = false;
 }
Exemplo n.º 10
0
 /// <inheritdoc/>
 public virtual void Dispose()
 {
     PlatformImpl.Dispose();
 }
Exemplo n.º 11
0
 public void Dispose()
 {
     PlatformImpl?.Dispose();
 }
Exemplo n.º 12
0
 /// <summary>
 /// Disposes of unmanaged resources associated with the formatted text.
 /// </summary>
 protected override void DoDispose()
 {
     PlatformImpl.Dispose();
 }
Exemplo n.º 13
0
 /// <summary>
 /// Closes the window.
 /// </summary>
 public void Close()
 {
     s_windows.Remove(this);
     PlatformImpl.Dispose();
 }
Exemplo n.º 14
0
 /// <inheritdoc/>
 public void Dispose()
 {
     PlatformImpl?.Dispose();
     HandleClosed();
 }
Exemplo n.º 15
0
 public void Dispose() => PlatformImpl.Dispose();