| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | |
| | | 6 | | namespace CoreWCF.Dispatcher |
| | | 7 | | { |
| | | 8 | | public class NetDispatcherFaultException : FaultException |
| | | 9 | | { |
| | | 10 | | public NetDispatcherFaultException(string reason, FaultCode code, Exception innerException) |
| | 0 | 11 | | : base(reason, code, FaultCodeConstants.Actions.NetDispatcher, innerException) |
| | | 12 | | { |
| | 0 | 13 | | } |
| | | 14 | | public NetDispatcherFaultException(FaultReason reason, FaultCode code, Exception innerException) |
| | 0 | 15 | | : base(reason, code, FaultCodeConstants.Actions.NetDispatcher, innerException) |
| | | 16 | | { |
| | 0 | 17 | | } |
| | | 18 | | |
| | | 19 | | public static NetDispatcherFaultException CreateDeserializationFailedFault(string reason, Exception innerExcepti |
| | | 20 | | { |
| | 0 | 21 | | reason = SR.Format(SR.SFxDeserializationFailed1, reason); |
| | 0 | 22 | | FaultCode code = new FaultCode(FaultCodeConstants.Codes.DeserializationFailed, FaultCodeConstants.Namespaces |
| | 0 | 23 | | code = FaultCode.CreateSenderFaultCode(code); |
| | 0 | 24 | | return new NetDispatcherFaultException(reason, code, innerException); |
| | | 25 | | } |
| | | 26 | | } |
| | | 27 | | } |