//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.InfoCard { using System; using System.Diagnostics.CodeAnalysis; using Validation; /// /// Arguments for the event. /// public class TokenProcessingErrorEventArgs : EventArgs { /// /// Initializes a new instance of the class. /// /// The token XML. /// The exception. internal TokenProcessingErrorEventArgs(string tokenXml, Exception exception) { Requires.NotNull(tokenXml, "tokenXml"); Requires.NotNull(exception, "exception"); this.TokenXml = tokenXml; this.Exception = exception; } /// /// Gets the raw token XML. /// public string TokenXml { get; private set; } /// /// Gets the exception that was generated while processing the token. /// public Exception Exception { get; private set; } #if CONTRACTS_FULL /// /// Verifies conditions that should be true for any valid state of this object. /// [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Called by code contracts.")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Called by code contracts.")] [ContractInvariantMethod] private void ObjectInvariant() { Contract.Invariant(this.TokenXml != null); Contract.Invariant(this.Exception != null); } #endif } }