summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-06-26 07:20:54 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-06-26 07:20:54 -0700
commitb3c8561ac3a96ddf0c57b6fc2dbf0a3dbadacfc6 (patch)
treef27e64542bb607c7a39a6a9f51ec21777a62a959 /src
parenta4cb4b312fc43a62e3174d34539d18ddb7d2eb5a (diff)
downloadDotNetOpenAuth-b3c8561ac3a96ddf0c57b6fc2dbf0a3dbadacfc6.zip
DotNetOpenAuth-b3c8561ac3a96ddf0c57b6fc2dbf0a3dbadacfc6.tar.gz
DotNetOpenAuth-b3c8561ac3a96ddf0c57b6fc2dbf0a3dbadacfc6.tar.bz2
More switching to CC.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/Configuration/OpenIdElement.cs2
-rw-r--r--src/DotNetOpenAuth/Configuration/TypeConfigurationCollection.cs1
-rw-r--r--src/DotNetOpenAuth/UriUtil.cs2
-rw-r--r--src/DotNetOpenAuth/Yadis/HtmlParser.cs4
4 files changed, 4 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth/Configuration/OpenIdElement.cs b/src/DotNetOpenAuth/Configuration/OpenIdElement.cs
index fa21fb9..404b2f6 100644
--- a/src/DotNetOpenAuth/Configuration/OpenIdElement.cs
+++ b/src/DotNetOpenAuth/Configuration/OpenIdElement.cs
@@ -71,7 +71,7 @@ namespace DotNetOpenAuth.Configuration {
}
set {
- Contract.Requires(value > TimeSpan.Zero);
+ Contract.Requires<ArgumentOutOfRangeException>(value > TimeSpan.Zero);
this[MaxAuthenticationTimePropertyName] = value;
}
}
diff --git a/src/DotNetOpenAuth/Configuration/TypeConfigurationCollection.cs b/src/DotNetOpenAuth/Configuration/TypeConfigurationCollection.cs
index 8319e30..000cb6a 100644
--- a/src/DotNetOpenAuth/Configuration/TypeConfigurationCollection.cs
+++ b/src/DotNetOpenAuth/Configuration/TypeConfigurationCollection.cs
@@ -32,7 +32,6 @@ namespace DotNetOpenAuth.Configuration {
/// <param name="elements">The elements that should be added to the collection initially.</param>
internal TypeConfigurationCollection(IEnumerable<Type> elements) {
Contract.Requires<ArgumentNullException>(elements != null);
- ErrorUtilities.VerifyArgumentNotNull(elements, "elements");
foreach (Type element in elements) {
this.BaseAdd(new TypeConfigurationElement<T> { TypeName = element.FullName });
diff --git a/src/DotNetOpenAuth/UriUtil.cs b/src/DotNetOpenAuth/UriUtil.cs
index 22e5f18..819c406 100644
--- a/src/DotNetOpenAuth/UriUtil.cs
+++ b/src/DotNetOpenAuth/UriUtil.cs
@@ -30,7 +30,7 @@ namespace DotNetOpenAuth {
/// </returns>
[ContractVerification(false)] // bugs/limitations in CC static analysis
internal static bool QueryStringContainPrefixedParameters(this Uri uri, string prefix) {
- Contract.Requires(!string.IsNullOrEmpty(prefix));
+ Contract.Requires<ArgumentException>(!string.IsNullOrEmpty(prefix));
if (uri == null) {
return false;
}
diff --git a/src/DotNetOpenAuth/Yadis/HtmlParser.cs b/src/DotNetOpenAuth/Yadis/HtmlParser.cs
index 406cb4b..a6b64c1 100644
--- a/src/DotNetOpenAuth/Yadis/HtmlParser.cs
+++ b/src/DotNetOpenAuth/Yadis/HtmlParser.cs
@@ -98,8 +98,8 @@ namespace DotNetOpenAuth.Yadis {
/// <param name="attribute">The attribute.</param>
/// <returns>A filtered sequence of attributes.</returns>
internal static IEnumerable<T> WithAttribute<T>(this IEnumerable<T> sequence, string attribute) where T : HtmlControl {
- Contract.Requires(sequence != null);
- Contract.Requires(!String.IsNullOrEmpty(attribute));
+ Contract.Requires<ArgumentNullException>(sequence != null);
+ Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(attribute));
return sequence.Where(tag => tag.Attributes[attribute] != null);
}