System.Net.HttpListener.EndGetContext C# (CSharp) Method

EndGetContext() public method

public EndGetContext ( IAsyncResult asyncResult ) : HttpListenerContext
asyncResult IAsyncResult
return HttpListenerContext
        public HttpListenerContext EndGetContext(IAsyncResult asyncResult)
        {
            throw new PlatformNotSupportedException();
        }

Usage Example

Esempio n. 1
0
        public static void GetContext(System.Net.HttpListener listener, Action <Exception, System.Net.HttpListenerContext> callback)
        {
            try
            {
                listener.BeginGetContext((result) =>
                {
                    try
                    {
                        var context = listener.EndGetContext(result);

                        Loop.Post(() =>
                        {
                            callback(null, context);
                        });
                    }
                    catch (Exception exception)
                    {
                        Loop.Post(() =>
                        {
                            callback(exception, null);
                        });
                    }
                }, null);
            }
            catch (Exception exception)
            {
                callback(exception, null);
            }
        }
All Usage Examples Of System.Net.HttpListener::EndGetContext