| | | 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 | | |
| | | 7 | | namespace CoreWCF.Security |
| | | 8 | | { |
| | | 9 | | [Serializable] |
| | | 10 | | public class MessageSecurityException : CommunicationException |
| | | 11 | | { |
| | | 12 | | private readonly MessageFault _fault; |
| | | 13 | | private readonly bool _isReplay = false; |
| | | 14 | | |
| | | 15 | | public MessageSecurityException() |
| | 0 | 16 | | : base() |
| | | 17 | | { |
| | 0 | 18 | | } |
| | | 19 | | |
| | | 20 | | public MessageSecurityException(string message) |
| | 4 | 21 | | : base(message) |
| | | 22 | | { |
| | 4 | 23 | | } |
| | | 24 | | |
| | | 25 | | public MessageSecurityException(string message, Exception innerException) |
| | 29 | 26 | | : base(message, innerException) |
| | | 27 | | { |
| | 29 | 28 | | } |
| | | 29 | | |
| | | 30 | | protected MessageSecurityException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serializa |
| | 0 | 31 | | : base(info, context) |
| | | 32 | | { |
| | 0 | 33 | | } |
| | | 34 | | |
| | | 35 | | internal MessageSecurityException(string message, Exception innerException, MessageFault fault) |
| | 0 | 36 | | : base(message, innerException) |
| | | 37 | | { |
| | 0 | 38 | | _fault = fault; |
| | 0 | 39 | | } |
| | | 40 | | |
| | | 41 | | internal MessageSecurityException(string message, bool isReplay) |
| | 0 | 42 | | : base(message) |
| | | 43 | | { |
| | 0 | 44 | | _isReplay = isReplay; |
| | 0 | 45 | | } |
| | | 46 | | |
| | | 47 | | internal bool ReplayDetected |
| | | 48 | | { |
| | | 49 | | get |
| | | 50 | | { |
| | 0 | 51 | | return _isReplay; |
| | | 52 | | } |
| | | 53 | | } |
| | | 54 | | |
| | | 55 | | internal MessageFault Fault |
| | | 56 | | { |
| | 31 | 57 | | get { return _fault; } |
| | | 58 | | } |
| | | 59 | | } |
| | | 60 | | } |