diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-05-21 21:31:33 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-05-21 21:31:33 -0700 |
commit | 168d4ca66ae025408995315e30bae355deb06d41 (patch) | |
tree | e4d8eefaecdd0bd7108b8ebe672cfd45354f2482 | |
parent | 510723cc2773ad3f1e306001310d7a8b28e89d1a (diff) | |
download | DotNetOpenAuth-168d4ca66ae025408995315e30bae355deb06d41.zip DotNetOpenAuth-168d4ca66ae025408995315e30bae355deb06d41.tar.gz DotNetOpenAuth-168d4ca66ae025408995315e30bae355deb06d41.tar.bz2 |
Updated to Code Contracts 1.2.20518.12, and fixed a couple of lingering FxCop messages.
-rw-r--r-- | lib/Microsoft.Contracts.dll | bin | 0 -> 15872 bytes | |||
-rw-r--r-- | src/DotNetOpenAuth.Test/AssemblyTesting.cs | 4 | ||||
-rw-r--r-- | src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs | 1 | ||||
-rw-r--r-- | src/DotNetOpenAuth/OpenId/ChannelElements/OpenIdChannel.cs | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/lib/Microsoft.Contracts.dll b/lib/Microsoft.Contracts.dll Binary files differnew file mode 100644 index 0000000..a790fe2 --- /dev/null +++ b/lib/Microsoft.Contracts.dll diff --git a/src/DotNetOpenAuth.Test/AssemblyTesting.cs b/src/DotNetOpenAuth.Test/AssemblyTesting.cs index 1d8f521..d0868d2 100644 --- a/src/DotNetOpenAuth.Test/AssemblyTesting.cs +++ b/src/DotNetOpenAuth.Test/AssemblyTesting.cs @@ -16,9 +16,9 @@ namespace DotNetOpenAuth.Test { Contract.ContractFailed += (sender, e) => { if (e.FailureKind == ContractFailureKind.Precondition) { // Currently we ignore these so that the regular ErrorUtilities can kick in. - e.Handled = true; + e.SetHandled(); } else { - e.Handled = true; + e.SetHandled(); Assert.Fail(e.FailureKind.ToString() + ": " + e.Message); } }; diff --git a/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs b/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs index 949c12b..2c6d677 100644 --- a/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs +++ b/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs @@ -386,7 +386,6 @@ namespace DotNetOpenAuth.InfoCard { public void RaisePostBackEvent(string eventArgument) { if (!string.IsNullOrEmpty(this.TokenXml)) { try { - bool encrypted = Token.IsEncrypted(this.TokenXml); ReceivingTokenEventArgs receivingArgs = this.OnReceivingToken(this.TokenXml); if (!receivingArgs.Cancel) { diff --git a/src/DotNetOpenAuth/OpenId/ChannelElements/OpenIdChannel.cs b/src/DotNetOpenAuth/OpenId/ChannelElements/OpenIdChannel.cs index 67fbcd4..1ddd1eb 100644 --- a/src/DotNetOpenAuth/OpenId/ChannelElements/OpenIdChannel.cs +++ b/src/DotNetOpenAuth/OpenId/ChannelElements/OpenIdChannel.cs @@ -7,6 +7,7 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { using System; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.Globalization; using System.IO; @@ -314,6 +315,7 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { /// <returns> /// An array of binding elements which may be used to construct the channel. /// </returns> + [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Needed for code contracts.")] private static IChannelBindingElement[] InitializeBindingElements<T>(IAssociationStore<T> associationStore, INonceStore nonceStore, SecuritySettings securitySettings, bool nonVerifying) { Contract.Requires(securitySettings != null); Contract.Requires(!nonVerifying || securitySettings is RelyingPartySecuritySettings); |