Owin.Host.MonoHttpListener.RequestProcessing.OwinHttpListenerContext.End C# (CSharp) Méthode

End() private méthode

private End ( Exception ex ) : void
ex System.Exception
Résultat void
        internal void End(Exception ex)
        {
            if (ex != null)
            {
                // TODO: LOG
                // Lazy initialized
                if (_cts != null)
                {
                    try
                    {
                        _cts.Cancel();
                    }
                    catch (ObjectDisposedException)
                    {
                    }
                    catch (AggregateException)
                    {
                        // TODO: LOG
                    }
                }
            }

            End();
        }

Same methods

OwinHttpListenerContext::End ( ) : void

Usage Example

 private void EndRequest(OwinHttpListenerContext owinContext, Exception ex)
 {
     // TODO: Log the exception, if any
     Interlocked.Decrement(ref _currentOutstandingRequests);
     if (owinContext != null)
     {
         owinContext.End(ex);
         owinContext.Dispose();
     }
     // Make sure we start the next request on a new thread, need to prevent stack overflows.
     OffloadStartNextRequest();
 }