diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2011-09-18 07:40:02 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2011-09-18 07:40:02 -0700 |
commit | cfe8dac81872ed4ba425864d550d66abcae581d2 (patch) | |
tree | 02908354efecbfb74caaf11538f6852148e74a53 /src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs | |
parent | d36e126e7daa6a0d106fa44692e931d489436bbf (diff) | |
download | DotNetOpenAuth-cfe8dac81872ed4ba425864d550d66abcae581d2.zip DotNetOpenAuth-cfe8dac81872ed4ba425864d550d66abcae581d2.tar.gz DotNetOpenAuth-cfe8dac81872ed4ba425864d550d66abcae581d2.tar.bz2 |
All product assemblies build without ccrewrite.exe now.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs')
-rw-r--r-- | src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs index a6fae13..fc14bcf 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/WebServerClient.cs @@ -66,9 +66,9 @@ namespace DotNetOpenAuth.OAuth2 { /// <param name="state">The state of the client that should be sent back with the authorization response.</param> /// <returns>The authorization request.</returns> public OutgoingWebResponse PrepareRequestUserAuthorization(IAuthorizationState authorization, string state = null) { - Contract.Requires<ArgumentNullException>(authorization != null); - Contract.Requires<InvalidOperationException>(authorization.Callback != null || (HttpContext.Current != null && HttpContext.Current.Request != null), MessagingStrings.HttpContextRequired); - Contract.Requires<InvalidOperationException>(!string.IsNullOrEmpty(this.ClientIdentifier)); + Requires.NotNull(authorization, "authorization"); + Requires.ValidState(authorization.Callback != null || (HttpContext.Current != null && HttpContext.Current.Request != null), MessagingStrings.HttpContextRequired); + Requires.ValidState(!string.IsNullOrEmpty(this.ClientIdentifier)); Contract.Ensures(Contract.Result<OutgoingWebResponse>() != null); if (authorization.Callback == null) { @@ -94,8 +94,8 @@ namespace DotNetOpenAuth.OAuth2 { /// <param name="request">The incoming HTTP request that may carry an authorization response.</param> /// <returns>The authorization state that contains the details of the authorization.</returns> public IAuthorizationState ProcessUserAuthorization(HttpRequestInfo request = null) { - Contract.Requires<InvalidOperationException>(!string.IsNullOrEmpty(this.ClientIdentifier)); - Contract.Requires<InvalidOperationException>(!string.IsNullOrEmpty(this.ClientSecret)); + Requires.ValidState(!string.IsNullOrEmpty(this.ClientIdentifier)); + Requires.ValidState(!string.IsNullOrEmpty(this.ClientSecret)); if (request == null) { request = this.Channel.GetRequestFromContext(); |