diff options
Diffstat (limited to 'src/DotNetOpenAuth.InfoCard.UI/InfoCard')
6 files changed, 3 insertions, 18 deletions
diff --git a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ClaimType.cs b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ClaimType.cs index 831e38d..53898ba 100644 --- a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ClaimType.cs +++ b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ClaimType.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.InfoCard { using System; using System.ComponentModel; - using System.Diagnostics.Contracts; using System.IdentityModel.Claims; using System.Web.UI; @@ -16,7 +15,6 @@ namespace DotNetOpenAuth.InfoCard { /// </summary> [PersistChildren(false)] [Serializable] - [ContractVerification(true)] public class ClaimType { /// <summary> /// Initializes a new instance of the <see cref="ClaimType"/> class. diff --git a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardImage.cs b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardImage.cs index 821ea1b..cdb0562 100644 --- a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardImage.cs +++ b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardImage.cs @@ -23,7 +23,6 @@ namespace DotNetOpenAuth.InfoCard { using System; using System.Diagnostics.CodeAnalysis; - using System.Diagnostics.Contracts; using System.Globalization; /// <summary> @@ -130,7 +129,7 @@ namespace DotNetOpenAuth.InfoCard { /// <returns>The manifest resource stream name.</returns> internal static string GetImageManifestResourceStreamName(InfoCardImageSize size) { string imageSize = size.ToString(); - Contract.Assume(imageSize.Length >= 6); + Assumes.True(imageSize.Length >= 6); imageSize = imageSize.Substring(4); return string.Format(CultureInfo.InvariantCulture, UrlFormatString, imageSize); } diff --git a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardSelector.cs b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardSelector.cs index d9e8687..3b6b368 100644 --- a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardSelector.cs +++ b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/InfoCardSelector.cs @@ -48,7 +48,6 @@ namespace DotNetOpenAuth.InfoCard { [PersistChildren(false)] [DefaultEvent("ReceivedToken")] [ToolboxData("<{0}:InfoCardSelector runat=\"server\"><ClaimsRequested><{0}:ClaimType Name=\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier\" /></ClaimsRequested><UnsupportedTemplate><p>Your browser does not support Information Cards.</p></UnsupportedTemplate></{0}:InfoCardSelector>")] - [ContractVerification(true)] public class InfoCardSelector : CompositeControl, IPostBackEventHandler { /// <summary> /// The resource name for getting at the SupportingScript.js embedded manifest stream. @@ -230,7 +229,6 @@ namespace DotNetOpenAuth.InfoCard { [PersistenceMode(PersistenceMode.InnerProperty), Category(InfoCardCategory)] public Collection<ClaimType> ClaimsRequested { get { - Contract.Ensures(Contract.Result<Collection<ClaimType>>() != null); if (this.ViewState[ClaimsRequestedViewStateKey] == null) { var claims = new Collection<ClaimType>(); this.ViewState[ClaimsRequestedViewStateKey] = claims; @@ -548,7 +546,6 @@ namespace DotNetOpenAuth.InfoCard { /// <param name="value">The parameter value.</param> /// <returns>The control that renders to the Param tag.</returns> private static string CreateParamJs(string name, string value) { - Contract.Ensures(Contract.Result<string>() != null); string scriptFormat = @" objp = document.createElement('param'); objp.name = {0}; objp.value = {1}; @@ -568,8 +565,6 @@ namespace DotNetOpenAuth.InfoCard { /// <returns>The Panel control</returns> [Pure] private Panel CreateInfoCardSupportedPanel() { - Contract.Ensures(Contract.Result<Panel>() != null); - Panel supportedPanel = new Panel(); try { @@ -627,8 +622,6 @@ namespace DotNetOpenAuth.InfoCard { /// <returns>The Panel control.</returns> [Pure] private Panel CreateInfoCardUnsupportedPanel() { - Contract.Ensures(Contract.Result<Panel>() != null); - Panel unsupportedPanel = new Panel(); try { if (this.UnsupportedTemplate != null) { @@ -726,8 +719,6 @@ namespace DotNetOpenAuth.InfoCard { [Pure] private void GetRequestedClaims(out string required, out string optional) { RequiresEx.ValidState(this.ClaimsRequested != null); - Contract.Ensures(Contract.ValueAtReturn<string>(out required) != null); - Contract.Ensures(Contract.ValueAtReturn<string>(out optional) != null); var nonEmptyClaimTypes = this.ClaimsRequested.Where(c => c.Name != null); @@ -742,8 +733,8 @@ namespace DotNetOpenAuth.InfoCard { string[] optionalClaimsArray = optionalClaims.ToArray(); required = string.Join(" ", requiredClaimsArray); optional = string.Join(" ", optionalClaimsArray); - Contract.Assume(required != null); - Contract.Assume(optional != null); + Assumes.True(required != null); + Assumes.True(optional != null); } /// <summary> diff --git a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivedTokenEventArgs.cs b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivedTokenEventArgs.cs index 94d3d63..2ec124b 100644 --- a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivedTokenEventArgs.cs +++ b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivedTokenEventArgs.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.InfoCard { using System; using System.Diagnostics.CodeAnalysis; - using System.Diagnostics.Contracts; using System.Xml.XPath; /// <summary> diff --git a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivingTokenEventArgs.cs b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivingTokenEventArgs.cs index ed3b6ae..6de2ef0 100644 --- a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivingTokenEventArgs.cs +++ b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/ReceivingTokenEventArgs.cs @@ -8,7 +8,6 @@ namespace DotNetOpenAuth.InfoCard { using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - using System.Diagnostics.Contracts; using System.IdentityModel.Tokens; using System.Security.Cryptography.X509Certificates; using Validation; diff --git a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/TokenProcessingErrorEventArgs.cs b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/TokenProcessingErrorEventArgs.cs index b744e48..104df15 100644 --- a/src/DotNetOpenAuth.InfoCard.UI/InfoCard/TokenProcessingErrorEventArgs.cs +++ b/src/DotNetOpenAuth.InfoCard.UI/InfoCard/TokenProcessingErrorEventArgs.cs @@ -6,7 +6,6 @@ namespace DotNetOpenAuth.InfoCard { using System; using System.Diagnostics.CodeAnalysis; - using System.Diagnostics.Contracts; using Validation; /// <summary> |