diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:20:46 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:20:46 -0800 |
commit | 3475fab579db0f6a1454ebc83d2e8a9c271e4c18 (patch) | |
tree | bc1cc264acba9edc486eefbbfbb5fd4822111fb1 /src/DotNetOpenAuth.OAuth2.Client/OAuth2 | |
parent | 002ce0e39af3b684ce6060dce60805e3333420fa (diff) | |
download | DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.zip DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.tar.gz DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.tar.bz2 |
Removes more remnants of Code Contracts.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client/OAuth2')
5 files changed, 0 insertions, 37 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs index b0cdb4b..cf57618 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ChannelElements/OAuth2ClientChannel.cs @@ -8,7 +8,6 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements { using System; using System.Collections.Generic; using System.Collections.Specialized; - using System.Diagnostics.Contracts; using System.Net; using System.Web; using System.Xml; diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs index a21c597..b2178e9 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientBase.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.OAuth2 { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Globalization; using System.Linq; using System.Net; @@ -224,7 +223,6 @@ namespace DotNetOpenAuth.OAuth2 { public IAuthorizationState GetScopedAccessToken(string refreshToken, HashSet<string> scope) { Requires.NotNullOrEmpty(refreshToken, "refreshToken"); Requires.NotNull(scope, "scope"); - Contract.Ensures(Contract.Result<IAuthorizationState>() != null); var request = new AccessTokenRefreshRequestC(this.AuthorizationServer) { ClientIdentifier = this.ClientIdentifier, diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/IClientAuthorizationTracker.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/IClientAuthorizationTracker.cs index bf16aff..d42248a 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/IClientAuthorizationTracker.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/IClientAuthorizationTracker.cs @@ -6,13 +6,11 @@ namespace DotNetOpenAuth.OAuth2 { using System; - using System.Diagnostics.Contracts; using Validation; /// <summary> /// A token manager implemented by some clients to assist in tracking authorization state. /// </summary> - [ContractClass(typeof(IClientAuthorizationTrackerContract))] public interface IClientAuthorizationTracker { /// <summary> /// Gets the state of the authorization for a given callback URL and client state. @@ -22,33 +20,4 @@ namespace DotNetOpenAuth.OAuth2 { /// <returns>The authorization state; may be <c>null</c> if no authorization state matches.</returns> IAuthorizationState GetAuthorizationState(Uri callbackUrl, string clientState); } - - /// <summary> - /// Contract class for the <see cref="IClientAuthorizationTracker"/> interface. - /// </summary> - [ContractClassFor(typeof(IClientAuthorizationTracker))] - internal abstract class IClientAuthorizationTrackerContract : IClientAuthorizationTracker { - /// <summary> - /// Prevents a default instance of the <see cref="IClientAuthorizationTrackerContract"/> class from being created. - /// </summary> - private IClientAuthorizationTrackerContract() { - } - - #region IClientTokenManager Members - - /// <summary> - /// Gets the state of the authorization for a given callback URL and client state. - /// </summary> - /// <param name="callbackUrl">The callback URL.</param> - /// <param name="clientState">State of the client stored at the beginning of an authorization request.</param> - /// <returns> - /// The authorization state; may be <c>null</c> if no authorization state matches. - /// </returns> - IAuthorizationState IClientAuthorizationTracker.GetAuthorizationState(Uri callbackUrl, string clientState) { - Requires.NotNull(callbackUrl, "callbackUrl"); - throw new NotImplementedException(); - } - - #endregion - } } diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/UserAgentClient.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/UserAgentClient.cs index 3a9529c..dcb3826 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/UserAgentClient.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/UserAgentClient.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.OAuth2 { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Linq; using System.Text; using System.Web; diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs index 491048a..63d96e1 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.OAuth2 { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Globalization; using System.Linq; using System.Net; @@ -92,7 +91,6 @@ namespace DotNetOpenAuth.OAuth2 { Requires.NotNull(authorization, "authorization"); RequiresEx.ValidState(authorization.Callback != null || (HttpContext.Current != null && HttpContext.Current.Request != null), MessagingStrings.HttpContextRequired); RequiresEx.ValidState(!string.IsNullOrEmpty(this.ClientIdentifier), Strings.RequiredPropertyNotYetPreset, "ClientIdentifier"); - Contract.Ensures(Contract.Result<OutgoingWebResponse>() != null); if (authorization.Callback == null) { authorization.Callback = this.Channel.GetRequestFromContext().GetPublicFacingUrl() |