summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdOfflineProvider/HttpHost.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-12-26 20:20:46 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-12-26 20:20:46 -0800
commit3475fab579db0f6a1454ebc83d2e8a9c271e4c18 (patch)
treebc1cc264acba9edc486eefbbfbb5fd4822111fb1 /samples/OpenIdOfflineProvider/HttpHost.cs
parent002ce0e39af3b684ce6060dce60805e3333420fa (diff)
downloadDotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.zip
DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.tar.gz
DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.tar.bz2
Removes more remnants of Code Contracts.
Diffstat (limited to 'samples/OpenIdOfflineProvider/HttpHost.cs')
-rw-r--r--samples/OpenIdOfflineProvider/HttpHost.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/samples/OpenIdOfflineProvider/HttpHost.cs b/samples/OpenIdOfflineProvider/HttpHost.cs
index 692307e..3eb0884 100644
--- a/samples/OpenIdOfflineProvider/HttpHost.cs
+++ b/samples/OpenIdOfflineProvider/HttpHost.cs
@@ -6,13 +6,13 @@
namespace DotNetOpenAuth.OpenIdOfflineProvider {
using System;
- using System.Diagnostics.Contracts;
using System.Globalization;
using System.IO;
using System.Net;
using System.Threading;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OpenId.Provider;
+ using Validation;
/// <summary>
/// An HTTP Listener that dispatches incoming requests for handling.
@@ -39,7 +39,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
/// </summary>
/// <param name="handler">The handler for incoming HTTP requests.</param>
private HttpHost(RequestHandler handler) {
- Contract.Requires(handler != null);
+ Requires.NotNull(handler, "handler");
this.Port = 45235;
this.handler = handler;
@@ -85,8 +85,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
/// <param name="handler">The handler for incoming HTTP requests.</param>
/// <returns>The instantiated host.</returns>
public static HttpHost CreateHost(RequestHandler handler) {
- Contract.Requires(handler != null);
- Contract.Ensures(Contract.Result<HttpHost>() != null);
+ Requires.NotNull(handler, "handler");
return new HttpHost(handler);
}
@@ -119,7 +118,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
/// The HTTP listener thread body.
/// </summary>
private void ProcessRequests() {
- Contract.Requires(this.listener != null);
+ Assumes.True(this.listener != null);
while (true) {
try {