| | | 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 | | using CoreWCF.Channels; |
| | | 6 | | using CoreWCF.Runtime; |
| | | 7 | | |
| | | 8 | | namespace CoreWCF |
| | | 9 | | { |
| | | 10 | | //[Serializable] |
| | | 11 | | public class ActionNotSupportedException : CommunicationException |
| | | 12 | | { |
| | 0 | 13 | | public ActionNotSupportedException() { } |
| | 0 | 14 | | public ActionNotSupportedException(string message) : base(message) { } |
| | 0 | 15 | | public ActionNotSupportedException(string message, Exception innerException) : base(message, innerException) { } |
| | | 16 | | // protected ActionNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) |
| | | 17 | | |
| | | 18 | | internal Message ProvideFault(MessageVersion messageVersion) |
| | | 19 | | { |
| | | 20 | | Fx.Assert(messageVersion.Addressing != AddressingVersion.None, ""); |
| | 0 | 21 | | FaultCode code = FaultCode.CreateSenderFaultCode(AddressingStrings.ActionNotSupported, messageVersion.Addres |
| | 0 | 22 | | string reason = Message; |
| | 0 | 23 | | return Channels.Message.CreateMessage( |
| | 0 | 24 | | messageVersion, code, reason, messageVersion.Addressing.FaultAction); |
| | | 25 | | } |
| | | 26 | | } |
| | | 27 | | } |