summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Messaging/Reporting.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-09-17 17:19:26 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-09-17 17:19:26 -0700
commitbab1c76d35421a3d2a1608e6f3e66d67b4fbdb09 (patch)
treecc27e38eb52d26bb2a977b2d0335f0f04a23c746 /src/DotNetOpenAuth.Messaging/Reporting.cs
parent344c333ecd76785a77b8a1a56e1bc360ae159d04 (diff)
downloadDotNetOpenAuth-bab1c76d35421a3d2a1608e6f3e66d67b4fbdb09.zip
DotNetOpenAuth-bab1c76d35421a3d2a1608e6f3e66d67b4fbdb09.tar.gz
DotNetOpenAuth-bab1c76d35421a3d2a1608e6f3e66d67b4fbdb09.tar.bz2
DotNetOpenAuth.Messaging no longer relies on ccrewrite.exe
Diffstat (limited to 'src/DotNetOpenAuth.Messaging/Reporting.cs')
-rw-r--r--src/DotNetOpenAuth.Messaging/Reporting.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/DotNetOpenAuth.Messaging/Reporting.cs b/src/DotNetOpenAuth.Messaging/Reporting.cs
index f197e81..0bbbcec 100644
--- a/src/DotNetOpenAuth.Messaging/Reporting.cs
+++ b/src/DotNetOpenAuth.Messaging/Reporting.cs
@@ -554,7 +554,7 @@ namespace DotNetOpenAuth {
/// If an existing identifier is not found, a new one is created, persisted, and returned.
/// </remarks>
private static Guid GetOrCreateOriginIdentity() {
- Contract.Requires<InvalidOperationException>(file != null);
+ Requires.ValidState(file != null);
Contract.Ensures(Contract.Result<Guid>() != Guid.Empty);
Guid identityGuid = Guid.Empty;
@@ -584,7 +584,7 @@ namespace DotNetOpenAuth {
/// <param name="fileName">The filename to sanitize.</param>
/// <returns>The filename, with any and all invalid filename characters replaced with the hyphen (-) character.</returns>
private static string SanitizeFileName(string fileName) {
- Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(fileName));
+ Requires.NotNullOrEmpty(fileName, "fileName");
char[] invalidCharacters = Path.GetInvalidFileNameChars();
if (fileName.IndexOfAny(invalidCharacters) < 0) {
return fileName; // nothing invalid about this filename.
@@ -651,8 +651,8 @@ namespace DotNetOpenAuth {
/// <param name="fileName">Name of the file.</param>
/// <param name="maximumElements">The maximum number of elements to track.</param>
internal PersistentHashSet(IsolatedStorageFile storage, string fileName, int maximumElements) {
- Contract.Requires<ArgumentNullException>(storage != null);
- Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(fileName));
+ Requires.NotNull(storage, "storage");
+ Requires.NotNullOrEmpty(fileName, "fileName");
this.FileName = fileName;
this.maximumElements = maximumElements;
@@ -796,8 +796,8 @@ namespace DotNetOpenAuth {
/// <param name="storage">The storage location.</param>
/// <param name="fileName">Name of the file.</param>
internal PersistentCounter(IsolatedStorageFile storage, string fileName) {
- Contract.Requires<ArgumentNullException>(storage != null);
- Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(fileName));
+ Requires.NotNull(storage, "storage");
+ Requires.NotNullOrEmpty(fileName, "fileName");
this.FileName = fileName;
// Load the file into memory.