summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Microsoft.Contracts.dllbin0 -> 15872 bytes
-rw-r--r--src/DotNetOpenAuth.Test/AssemblyTesting.cs4
-rw-r--r--src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs1
-rw-r--r--src/DotNetOpenAuth/OpenId/ChannelElements/OpenIdChannel.cs2
4 files changed, 4 insertions, 3 deletions
diff --git a/lib/Microsoft.Contracts.dll b/lib/Microsoft.Contracts.dll
new file mode 100644
index 0000000..a790fe2
--- /dev/null
+++ b/lib/Microsoft.Contracts.dll
Binary files differ
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);