//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.Messaging { using System; using System.Collections.Generic; using System.Security; using System.Security.Permissions; /// /// An exception to represent errors in the local or remote implementation of the protocol. /// [Serializable] public class ProtocolException : Exception { /// /// Initializes a new instance of the class. /// public ProtocolException() { } /// /// Initializes a new instance of the class. /// /// A message describing the specific error the occurred or was detected. public ProtocolException(string message) : base(message) { } /// /// Initializes a new instance of the class. /// /// A message describing the specific error the occurred or was detected. /// The inner exception to include. public ProtocolException(string message, Exception inner) : base(message, inner) { } /// /// Initializes a new instance of the class /// such that it can be sent as a protocol message response to a remote caller. /// /// The human-readable exception message. /// The message that was the cause of the exception. May be null. /// The inner exception to include. protected internal ProtocolException(string message, IProtocolMessage faultedMessage, Exception innerException = null) : base(message, innerException) { this.FaultedMessage = faultedMessage; } /// /// Initializes a new instance of the class. /// /// The /// that holds the serialized object data about the exception being thrown. /// The System.Runtime.Serialization.StreamingContext /// that contains contextual information about the source or destination. protected ProtocolException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { throw new NotImplementedException(); } /// /// Gets the message that caused the exception. /// internal IProtocolMessage FaultedMessage { get; private set; } #if false /// /// When overridden in a derived class, sets the with information about the exception. /// /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. /// /// The parameter is a null reference (Nothing in Visual Basic). /// /// /// /// /// [SecurityCritical] public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { base.GetObjectData(info, context); throw new NotImplementedException(); } #endif } }