//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.Messaging { using System; using System.Globalization; /// /// An exception thrown when messages cannot receive all the protections they require. /// [Serializable] internal class UnprotectedMessageException : ProtocolException { /// /// Initializes a new instance of the class. /// /// The message whose protection requirements could not be met. /// The protection requirements that were fulfilled. internal UnprotectedMessageException(IProtocolMessage faultedMessage, MessageProtections appliedProtection) : base(string.Format(CultureInfo.CurrentCulture, MessagingStrings.InsufficientMessageProtection, faultedMessage.GetType().Name, faultedMessage.RequiredProtection, appliedProtection), 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 UnprotectedMessageException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } } }