System.Net.HttpListenerContext.Abort C# (CSharp) Method

Abort() private method

private Abort ( ) : void
return void
        internal void Abort()
        {
            if (NetEventSource.IsEnabled) NetEventSource.Enter(this);
            ForceCancelRequest(RequestQueueHandle, Request.RequestId);
            try
            {
                Request.Close();
            }
            finally
            {
                (_user?.Identity as IDisposable)?.Dispose();
            }
            if (NetEventSource.IsEnabled) NetEventSource.Exit(this);
        }

Usage Example

Esempio n. 1
0
        public void Abort()
        {
            if (Logging.On)
            {
                Logging.Enter(Logging.HttpListener, this, "abort", "");
            }
            try {
                if (m_ResponseState >= ResponseState.Closed)
                {
                    return;
                }

                m_ResponseState = ResponseState.Closed;
                HttpListenerContext.Abort();
            } finally {
                if (Logging.On)
                {
                    Logging.Exit(Logging.HttpListener, this, "abort", "");
                }
            }
        }
All Usage Examples Of System.Net.HttpListenerContext::Abort