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.OpenId.Provider/OpenId/Provider/PrivatePersonalIdentifierProviderBase.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.OpenId.Provider/OpenId/Provider/PrivatePersonalIdentifierProviderBase.cs')
-rw-r--r-- | src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/PrivatePersonalIdentifierProviderBase.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/PrivatePersonalIdentifierProviderBase.cs b/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/PrivatePersonalIdentifierProviderBase.cs index 46e172c..9ebae1d 100644 --- a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/PrivatePersonalIdentifierProviderBase.cs +++ b/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/PrivatePersonalIdentifierProviderBase.cs @@ -35,7 +35,7 @@ namespace DotNetOpenAuth.OpenId.Provider { /// </summary> /// <param name="baseIdentifier">The base URI on which to append the anonymous part.</param> protected PrivatePersonalIdentifierProviderBase(Uri baseIdentifier) { - Contract.Requires<ArgumentNullException>(baseIdentifier != null); + Requires.NotNull(baseIdentifier, "baseIdentifier"); this.Hasher = HashAlgorithm.Create(HashAlgorithmName); this.Encoder = Encoding.UTF8; @@ -102,7 +102,7 @@ namespace DotNetOpenAuth.OpenId.Provider { } set { - Contract.Requires<ArgumentOutOfRangeException>(value > 0); + Requires.InRange(value > 0, "value"); this.newSaltLength = value; } } @@ -157,8 +157,7 @@ namespace DotNetOpenAuth.OpenId.Provider { /// <returns> /// <c>true</c> if the given identifier is the valid, unique identifier for some uesr (and NOT a PPID); otherwise, <c>false</c>. /// </returns> - public virtual bool IsUserLocalIdentifier(Identifier identifier) - { + public virtual bool IsUserLocalIdentifier(Identifier identifier) { return !identifier.ToString().StartsWith(this.BaseIdentifier.AbsoluteUri, StringComparison.Ordinal); } @@ -181,7 +180,7 @@ namespace DotNetOpenAuth.OpenId.Provider { /// <returns>The full PPID Identifier.</returns> [SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings", Justification = "NOT equivalent overload. The recommended one breaks on relative URIs.")] protected virtual Uri AppendIdentifiers(string uriHash) { - Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(uriHash)); + Requires.NotNullOrEmpty(uriHash, "uriHash"); if (string.IsNullOrEmpty(this.BaseIdentifier.Query)) { // The uriHash will appear on the path itself. |