Exemple #1
0
        protected override void AddServerErrorHandlers(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
        {
            int errorHandlerCount = endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers.Count;

            base.AddServerErrorHandlers(endpoint, endpointDispatcher);
            IErrorHandler baseHandler = endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers[errorHandlerCount];

            endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers.RemoveAt(errorHandlerCount);
            JsonValueAwareValidationErrorHandler newHandler = new JsonValueAwareValidationErrorHandler(baseHandler);

            endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers.Add(newHandler);
        }
Exemple #2
0
 protected override void AddServerErrorHandlers(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
 {
     int errorHandlerCount = endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers.Count;
     base.AddServerErrorHandlers(endpoint, endpointDispatcher);
     IErrorHandler baseHandler = endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers[errorHandlerCount];
     endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers.RemoveAt(errorHandlerCount);
     JsonValueAwareValidationErrorHandler newHandler = new JsonValueAwareValidationErrorHandler(baseHandler);
     endpointDispatcher.DispatchRuntime.ChannelDispatcher.ErrorHandlers.Add(newHandler);
 }