static void OnBeginRequest(object state)
        {
            HostedHttpRequestAsyncResult self = (HostedHttpRequestAsyncResult)state;

            Exception completionException = null;

            try
            {
                self.BeginRequest();
            }
            catch (Exception e)
            {
                if (Fx.IsFatal(e))
                {
                    throw;
                }

                completionException = e;
            }

            if (completionException != null)
            {
                self.CompleteOperation(completionException);
            }
        }
コード例 #2
0
        private static void OnBeginRequest(object state)
        {
            HostedHttpRequestAsyncResult result = (HostedHttpRequestAsyncResult)state;
            Exception exception = null;

            try
            {
                result.BeginRequest();
            }
            catch (Exception exception2)
            {
                if (Fx.IsFatal(exception2))
                {
                    throw;
                }
                exception = exception2;
            }
            if (exception != null)
            {
                result.CompleteOperation(exception);
            }
        }