diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:22:14 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:22:14 -0800 |
commit | 391397a341282d0c088bc9e9901ced9b19a62e5a (patch) | |
tree | bc1cc264acba9edc486eefbbfbb5fd4822111fb1 /src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs | |
parent | 8f48e3f1daedb77e451f9fe8ac497741c6bb06f9 (diff) | |
parent | 3475fab579db0f6a1454ebc83d2e8a9c271e4c18 (diff) | |
download | DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.zip DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.tar.gz DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.tar.bz2 |
Merge branch 'retargeting-contracts'
Diffstat (limited to 'src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs b/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs index f009ce5..8f537c3 100644 --- a/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs +++ b/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs @@ -7,13 +7,12 @@ namespace DotNetOpenAuth.Configuration { using System.Collections.Generic; using System.Configuration; - using System.Diagnostics.Contracts; using System.Text.RegularExpressions; + using Validation; /// <summary> /// Represents a collection of child elements that describe host names either as literal host names or regex patterns. /// </summary> - [ContractVerification(true)] internal class HostNameOrRegexCollection : ConfigurationElementCollection { /// <summary> /// Initializes a new instance of the <see cref="HostNameOrRegexCollection"/> class. @@ -63,7 +62,7 @@ namespace DotNetOpenAuth.Configuration { /// An <see cref="T:System.Object"/> that acts as the key for the specified <see cref="T:System.Configuration.ConfigurationElement"/>. /// </returns> protected override object GetElementKey(ConfigurationElement element) { - Contract.Assume(element != null); // this should be Contract.Requires in base class. + Requires.NotNull(element, "element"); return ((HostNameElement)element).Name ?? string.Empty; } } |