diff options
Diffstat (limited to 'src')
-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 |
3 files changed, 4 insertions, 3 deletions
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 8455491..bc86259 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); |