summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-09-18 07:40:02 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-09-18 07:40:02 -0700
commitcfe8dac81872ed4ba425864d550d66abcae581d2 (patch)
tree02908354efecbfb74caaf11538f6852148e74a53 /src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs
parentd36e126e7daa6a0d106fa44692e931d489436bbf (diff)
downloadDotNetOpenAuth-cfe8dac81872ed4ba425864d550d66abcae581d2.zip
DotNetOpenAuth-cfe8dac81872ed4ba425864d550d66abcae581d2.tar.gz
DotNetOpenAuth-cfe8dac81872ed4ba425864d550d66abcae581d2.tar.bz2
All product assemblies build without ccrewrite.exe now.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs b/src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs
index a5baef0..927a6ed 100644
--- a/src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs
+++ b/src/DotNetOpenAuth.OAuth2.ResourceServer/OAuth2/ResourceServer.cs
@@ -29,7 +29,7 @@ namespace DotNetOpenAuth.OAuth2 {
/// </summary>
/// <param name="accessTokenAnalyzer">The access token analyzer.</param>
public ResourceServer(IAccessTokenAnalyzer accessTokenAnalyzer) {
- Contract.Requires<ArgumentNullException>(accessTokenAnalyzer != null);
+ Requires.NotNull(accessTokenAnalyzer, "accessTokenAnalyzer");
this.AccessTokenAnalyzer = accessTokenAnalyzer;
this.Channel = new OAuth2ResourceServerChannel();
@@ -71,7 +71,7 @@ namespace DotNetOpenAuth.OAuth2 {
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#", Justification = "Try pattern")]
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "Try pattern")]
public virtual OutgoingWebResponse VerifyAccess(HttpRequestInfo httpRequestInfo, out string userName, out HashSet<string> scope) {
- Contract.Requires<ArgumentNullException>(httpRequestInfo != null);
+ Requires.NotNull(httpRequestInfo, "httpRequestInfo");
AccessProtectedResourceRequest request = null;
try {
@@ -127,8 +127,8 @@ namespace DotNetOpenAuth.OAuth2 {
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#", Justification = "Try pattern")]
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "Try pattern")]
public virtual OutgoingWebResponse VerifyAccess(HttpRequestMessageProperty request, Uri requestUri, out IPrincipal principal) {
- Contract.Requires<ArgumentNullException>(request != null);
- Contract.Requires<ArgumentNullException>(requestUri != null);
+ Requires.NotNull(request, "request");
+ Requires.NotNull(requestUri, "requestUri");
return this.VerifyAccess(new HttpRequestInfo(request, requestUri), out principal);
}