summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Configuration
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Core/Configuration')
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/DotNetOpenAuthSection.cs2
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/HostNameElement.cs2
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs2
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/MessagingElement.cs3
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/ReportingElement.cs2
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/TrustedProviderConfigurationCollection.cs1
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/TypeConfigurationCollection.cs3
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/TypeConfigurationElement.cs6
-rw-r--r--src/DotNetOpenAuth.Core/Configuration/UntrustedWebRequestElement.cs1
9 files changed, 0 insertions, 22 deletions
diff --git a/src/DotNetOpenAuth.Core/Configuration/DotNetOpenAuthSection.cs b/src/DotNetOpenAuth.Core/Configuration/DotNetOpenAuthSection.cs
index 7c03c48..cdcd670 100644
--- a/src/DotNetOpenAuth.Core/Configuration/DotNetOpenAuthSection.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/DotNetOpenAuthSection.cs
@@ -7,7 +7,6 @@
namespace DotNetOpenAuth.Configuration {
using System;
using System.Configuration;
- using System.Diagnostics.Contracts;
using System.Web;
using System.Web.Configuration;
@@ -15,7 +14,6 @@ namespace DotNetOpenAuth.Configuration {
/// Represents the section in the host's .config file that configures
/// this library's settings.
/// </summary>
- [ContractVerification(true)]
public class DotNetOpenAuthSection : ConfigurationSectionGroup {
/// <summary>
/// The name of the section under which this library's settings must be found.
diff --git a/src/DotNetOpenAuth.Core/Configuration/HostNameElement.cs b/src/DotNetOpenAuth.Core/Configuration/HostNameElement.cs
index b46ece9..5386314 100644
--- a/src/DotNetOpenAuth.Core/Configuration/HostNameElement.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/HostNameElement.cs
@@ -6,12 +6,10 @@
namespace DotNetOpenAuth.Configuration {
using System.Configuration;
- using System.Diagnostics.Contracts;
/// <summary>
/// Represents the name of a single host or a regex pattern for host names.
/// </summary>
- [ContractVerification(true)]
internal class HostNameElement : ConfigurationElement {
/// <summary>
/// Gets the name of the @name attribute.
diff --git a/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs b/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs
index 27ba80e..8f537c3 100644
--- a/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/HostNameOrRegexCollection.cs
@@ -7,14 +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.
diff --git a/src/DotNetOpenAuth.Core/Configuration/MessagingElement.cs b/src/DotNetOpenAuth.Core/Configuration/MessagingElement.cs
index ff98d36..64dfba3 100644
--- a/src/DotNetOpenAuth.Core/Configuration/MessagingElement.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/MessagingElement.cs
@@ -7,14 +7,12 @@
namespace DotNetOpenAuth.Configuration {
using System;
using System.Configuration;
- using System.Diagnostics.Contracts;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.Messaging.Bindings;
/// <summary>
/// Represents the &lt;messaging&gt; element in the host's .config file.
/// </summary>
- [ContractVerification(true)]
public class MessagingElement : ConfigurationSection {
/// <summary>
/// The name of the &lt;webResourceUrlProvider&gt; sub-element.
@@ -75,7 +73,6 @@ namespace DotNetOpenAuth.Configuration {
/// </summary>
public static MessagingElement Configuration {
get {
- Contract.Ensures(Contract.Result<MessagingElement>() != null);
return (MessagingElement)ConfigurationManager.GetSection(MessagingElementName) ?? new MessagingElement();
}
}
diff --git a/src/DotNetOpenAuth.Core/Configuration/ReportingElement.cs b/src/DotNetOpenAuth.Core/Configuration/ReportingElement.cs
index 0af8205..f0184a6 100644
--- a/src/DotNetOpenAuth.Core/Configuration/ReportingElement.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/ReportingElement.cs
@@ -8,7 +8,6 @@ namespace DotNetOpenAuth.Configuration {
using System;
using System.Collections.Generic;
using System.Configuration;
- using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
@@ -76,7 +75,6 @@ namespace DotNetOpenAuth.Configuration {
/// </summary>
public static ReportingElement Configuration {
get {
- Contract.Ensures(Contract.Result<ReportingElement>() != null);
return (ReportingElement)ConfigurationManager.GetSection(ReportingElementName) ?? new ReportingElement();
}
}
diff --git a/src/DotNetOpenAuth.Core/Configuration/TrustedProviderConfigurationCollection.cs b/src/DotNetOpenAuth.Core/Configuration/TrustedProviderConfigurationCollection.cs
index 3f19d8c..de70f64 100644
--- a/src/DotNetOpenAuth.Core/Configuration/TrustedProviderConfigurationCollection.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/TrustedProviderConfigurationCollection.cs
@@ -9,7 +9,6 @@ namespace DotNetOpenAuth.Configuration {
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics.CodeAnalysis;
- using System.Diagnostics.Contracts;
using Validation;
/// <summary>
diff --git a/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationCollection.cs b/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationCollection.cs
index 274622e..08bd2a1 100644
--- a/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationCollection.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationCollection.cs
@@ -8,7 +8,6 @@ namespace DotNetOpenAuth.Configuration {
using System;
using System.Collections.Generic;
using System.Configuration;
- using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using DotNetOpenAuth.Messaging;
@@ -18,7 +17,6 @@ namespace DotNetOpenAuth.Configuration {
/// A collection of <see cref="TypeConfigurationElement&lt;T&gt;"/>.
/// </summary>
/// <typeparam name="T">The type that all types specified in the elements must derive from.</typeparam>
- [ContractVerification(true)]
internal class TypeConfigurationCollection<T> : ConfigurationElementCollection
where T : class {
/// <summary>
@@ -45,7 +43,6 @@ namespace DotNetOpenAuth.Configuration {
/// <param name="allowInternals">if set to <c>true</c> then internal types may be instantiated.</param>
/// <returns>A sequence of instances generated from types in this collection. May be empty, but never null.</returns>
internal IEnumerable<T> CreateInstances(bool allowInternals) {
- Contract.Ensures(Contract.Result<IEnumerable<T>>() != null);
return from element in this.Cast<TypeConfigurationElement<T>>()
where !element.IsEmpty
select element.CreateInstance(default(T), allowInternals);
diff --git a/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationElement.cs b/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationElement.cs
index edbb614..a3a8140 100644
--- a/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationElement.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/TypeConfigurationElement.cs
@@ -8,7 +8,6 @@ namespace DotNetOpenAuth.Configuration {
using System;
using System.Configuration;
using System.Diagnostics.CodeAnalysis;
- using System.Diagnostics.Contracts;
using System.IO;
using System.Reflection;
using System.Web;
@@ -82,8 +81,6 @@ namespace DotNetOpenAuth.Configuration {
/// <param name="defaultValue">The value to return if no type is given in the .config file.</param>
/// <returns>The newly instantiated type.</returns>
public T CreateInstance(T defaultValue) {
- Contract.Ensures(Contract.Result<T>() != null || Contract.Result<T>() == defaultValue);
-
return this.CreateInstance(defaultValue, false);
}
@@ -95,8 +92,6 @@ namespace DotNetOpenAuth.Configuration {
/// <returns>The newly instantiated type.</returns>
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "No apparent problem. False positive?")]
public T CreateInstance(T defaultValue, bool allowInternals) {
- Contract.Ensures(Contract.Result<T>() != null || Contract.Result<T>() == defaultValue);
-
if (this.CustomType != null) {
if (!allowInternals) {
// Although .NET will usually prevent our instantiating non-public types,
@@ -132,7 +127,6 @@ namespace DotNetOpenAuth.Configuration {
/// be present.
/// </remarks>
private static T CreateInstanceFromXaml(Stream xaml) {
- Contract.Ensures(Contract.Result<T>() != null);
#if CLR4
return (T)XamlServices.Load(xaml);
#else
diff --git a/src/DotNetOpenAuth.Core/Configuration/UntrustedWebRequestElement.cs b/src/DotNetOpenAuth.Core/Configuration/UntrustedWebRequestElement.cs
index b49452a..a16522a 100644
--- a/src/DotNetOpenAuth.Core/Configuration/UntrustedWebRequestElement.cs
+++ b/src/DotNetOpenAuth.Core/Configuration/UntrustedWebRequestElement.cs
@@ -7,7 +7,6 @@
namespace DotNetOpenAuth.Configuration {
using System;
using System.Configuration;
- using System.Diagnostics.Contracts;
/// <summary>
/// Represents the section of a .config file where security policies regarding web requests