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/IMessageFactory.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/IMessageFactory.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/IMessageFactory.cs | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/IMessageFactory.cs b/src/DotNetOpenAuth.Core/Messaging/IMessageFactory.cs index e45ac1d..1e86328 100644 --- a/src/DotNetOpenAuth.Core/Messaging/IMessageFactory.cs +++ b/src/DotNetOpenAuth.Core/Messaging/IMessageFactory.cs @@ -7,13 +7,12 @@ namespace DotNetOpenAuth.Messaging { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; + using Validation; /// <summary> /// A tool to analyze an incoming message to figure out what concrete class /// is designed to deserialize it and instantiates that class. /// </summary> - [ContractClass(typeof(IMessageFactoryContract))] public interface IMessageFactory { /// <summary> /// Analyzes an incoming request message payload to discover what kind of @@ -41,53 +40,4 @@ namespace DotNetOpenAuth.Messaging { /// </returns> IDirectResponseProtocolMessage GetNewResponseMessage(IDirectedProtocolMessage request, IDictionary<string, string> fields); } - - /// <summary> - /// Code contract for the <see cref="IMessageFactory"/> interface. - /// </summary> - [ContractClassFor(typeof(IMessageFactory))] - internal abstract class IMessageFactoryContract : IMessageFactory { - /// <summary> - /// Prevents a default instance of the <see cref="IMessageFactoryContract"/> class from being created. - /// </summary> - private IMessageFactoryContract() { - } - - #region IMessageFactory Members - - /// <summary> - /// Analyzes an incoming request message payload to discover what kind of - /// message is embedded in it and returns the type, or null if no match is found. - /// </summary> - /// <param name="recipient">The intended or actual recipient of the request message.</param> - /// <param name="fields">The name/value pairs that make up the message payload.</param> - /// <returns> - /// A newly instantiated <see cref="IProtocolMessage"/>-derived object that this message can - /// deserialize to. Null if the request isn't recognized as a valid protocol message. - /// </returns> - IDirectedProtocolMessage IMessageFactory.GetNewRequestMessage(MessageReceivingEndpoint recipient, IDictionary<string, string> fields) { - Requires.NotNull(recipient, "recipient"); - Requires.NotNull(fields, "fields"); - - throw new NotImplementedException(); - } - - /// <summary> - /// Analyzes an incoming request message payload to discover what kind of - /// message is embedded in it and returns the type, or null if no match is found. - /// </summary> - /// <param name="request">The message that was sent as a request that resulted in the response.</param> - /// <param name="fields">The name/value pairs that make up the message payload.</param> - /// <returns> - /// A newly instantiated <see cref="IProtocolMessage"/>-derived object that this message can - /// deserialize to. Null if the request isn't recognized as a valid protocol message. - /// </returns> - IDirectResponseProtocolMessage IMessageFactory.GetNewResponseMessage(IDirectedProtocolMessage request, IDictionary<string, string> fields) { - Requires.NotNull(request, "request"); - Requires.NotNull(fields, "fields"); - throw new NotImplementedException(); - } - - #endregion - } } |