示例#1
0
        internal static WebServiceExceptionEventArgs Create(Exception exception, IRequest request)
        {
            WebServiceExceptionEventArgs args;

            if (request == null)
            {
                args = new WebServiceExceptionEventArgs
                {
                    Exception = exception
                }
            }
            ;
            else
            {
                args = new WebServiceExceptionEventArgs
                {
                    Headers     = request.Headers,
                    Parameters  = request.Parameters,
                    ServiceName = request.ServiceName,
                    Request     = request.OriginalRequest,
                    Endpoint    = request.Endpoint,
                    Exception   = exception
                }
            };

            return(args);
        }

        #endregion
    }
 protected virtual void ProcessExceptionHandlers(IExecutionContext executionContext, Exception exception)
 {
     if (mExceptionEvent != null)
     {
         WebServiceExceptionEventArgs e = WebServiceExceptionEventArgs.Create(exception, executionContext.RequestContext.Request);
         mExceptionEvent(this, e);
     }
 }
        protected virtual void ProcessExceptionHandlers(IExecutionContext executionContext, Exception exception)
        {
            if (ExceptionEvent == null)
            {
                return;
            }

            WebServiceExceptionEventArgs args = WebServiceExceptionEventArgs.Create(exception, executionContext.RequestContext.Request);

            ExceptionEvent(this, args);
        }
示例#4
0
 internal static WebServiceExceptionEventArgs Create(Exception exception, IRequest request)
 {
     WebServiceExceptionEventArgs args = new WebServiceExceptionEventArgs
     {
         Headers = request.Headers,
         Parameters = request.Parameters,
         ServiceName = request.ServiceName,
         Request = request.OriginalRequest,
         Endpoint = request.Endpoint,
         Exception = exception
     };
     return args;
 }
        protected virtual void ProcessExceptionHandlers(Exception exception, IRequest request)
        {
            if (exception == null)
            {
                throw new ArgumentNullException("exception");
            }

            WebServiceExceptionEventArgs args = WebServiceExceptionEventArgs.Create(exception, request);

            if (ExceptionEvent != null)
            {
                ExceptionEvent(this, args);
            }
        }
        protected virtual void ProcessExceptionHandlers(Exception exception, IRequest request)
        {
            if (request == null)
            {
                return;
            }
            if (ExceptionEvent == null)
            {
                return;
            }

            WebServiceExceptionEventArgs args = WebServiceExceptionEventArgs.Create(exception, request);

            ExceptionEvent(this, args);
        }