diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:22:14 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:22:14 -0800 |
commit | 391397a341282d0c088bc9e9901ced9b19a62e5a (patch) | |
tree | bc1cc264acba9edc486eefbbfbb5fd4822111fb1 /src/DotNetOpenAuth.Core/Messaging/IMessage.cs | |
parent | 8f48e3f1daedb77e451f9fe8ac497741c6bb06f9 (diff) | |
parent | 3475fab579db0f6a1454ebc83d2e8a9c271e4c18 (diff) | |
download | DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.zip DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.tar.gz DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.tar.bz2 |
Merge branch 'retargeting-contracts'
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/IMessage.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/IMessage.cs | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/IMessage.cs b/src/DotNetOpenAuth.Core/Messaging/IMessage.cs index 62673ef..c007913 100644 --- a/src/DotNetOpenAuth.Core/Messaging/IMessage.cs +++ b/src/DotNetOpenAuth.Core/Messaging/IMessage.cs @@ -7,14 +7,12 @@ namespace DotNetOpenAuth.Messaging { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Text; /// <summary> /// The interface that classes must implement to be serialized/deserialized /// as protocol or extension messages. /// </summary> - [ContractClass(typeof(IMessageContract))] public interface IMessage { /// <summary> /// Gets the version of the protocol or extension this message is prepared to implement. @@ -46,55 +44,4 @@ namespace DotNetOpenAuth.Messaging { /// <exception cref="ProtocolException">Thrown if the message is invalid.</exception> void EnsureValidMessage(); } - - /// <summary> - /// Code contract for the <see cref="IMessage"/> interface. - /// </summary> - [ContractClassFor(typeof(IMessage))] - internal abstract class IMessageContract : IMessage { - /// <summary> - /// Prevents a default instance of the <see cref="IMessageContract"/> class from being created. - /// </summary> - private IMessageContract() { - } - - /// <summary> - /// Gets the version of the protocol or extension this message is prepared to implement. - /// </summary> - Version IMessage.Version { - get { - Contract.Ensures(Contract.Result<Version>() != null); - return default(Version); // dummy return - } - } - - /// <summary> - /// Gets the extra, non-standard Protocol parameters included in the message. - /// </summary> - /// <value></value> - /// <remarks> - /// Implementations of this interface should ensure that this property never returns null. - /// </remarks> - IDictionary<string, string> IMessage.ExtraData { - get { - Contract.Ensures(Contract.Result<IDictionary<string, string>>() != null); - return default(IDictionary<string, string>); - } - } - - /// <summary> - /// Checks the message state for conformity to the protocol specification - /// and throws an exception if the message is invalid. - /// </summary> - /// <remarks> - /// <para>Some messages have required fields, or combinations of fields that must relate to each other - /// in specialized ways. After deserializing a message, this method checks the state of the - /// message to see if it conforms to the protocol.</para> - /// <para>Note that this property should <i>not</i> check signatures or perform any state checks - /// outside this scope of this particular message.</para> - /// </remarks> - /// <exception cref="ProtocolException">Thrown if the message is invalid.</exception> - void IMessage.EnsureValidMessage() { - } - } } |