diff options
Diffstat (limited to 'src/DotNetOpenAuth.OpenId/OpenId/Identifier.cs')
-rw-r--r-- | src/DotNetOpenAuth.OpenId/OpenId/Identifier.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OpenId/OpenId/Identifier.cs b/src/DotNetOpenAuth.OpenId/OpenId/Identifier.cs index 3cdd0f3..7c08e66 100644 --- a/src/DotNetOpenAuth.OpenId/OpenId/Identifier.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/Identifier.cs @@ -12,6 +12,7 @@ namespace DotNetOpenAuth.OpenId { using System.Diagnostics.Contracts; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.Messaging.Reflection; + using Validation; /// <summary> /// An Identifier is either a "http" or "https" URI, or an XRI. @@ -92,7 +93,7 @@ namespace DotNetOpenAuth.OpenId { [SuppressMessage("Microsoft.Usage", "CA2225:OperatorOverloadsHaveNamedAlternates", Justification = "Our named alternate is Parse.")] [DebuggerStepThrough] public static implicit operator Identifier(string identifier) { - Requires.True(identifier == null || identifier.Length > 0, "identifier"); + Requires.That(identifier == null || identifier.Length > 0, "identifier", "Empty string cannot be translated to an identifier."); Contract.Ensures((identifier == null) == (Contract.Result<Identifier>() == null)); if (identifier == null) { |