summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-07-27 08:03:22 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-07-27 08:03:22 -0700
commite6849bb0cefdddcaa9002aaeac7a21f76e7f4e4c (patch)
treef4be12ba784be48c08257ab376778fe0122357db /src
parent40c0adc9a474c3e1f83491333e2f3b93bf6206c9 (diff)
downloadDotNetOpenAuth-e6849bb0cefdddcaa9002aaeac7a21f76e7f4e4c.zip
DotNetOpenAuth-e6849bb0cefdddcaa9002aaeac7a21f76e7f4e4c.tar.gz
DotNetOpenAuth-e6849bb0cefdddcaa9002aaeac7a21f76e7f4e4c.tar.bz2
Cleaned up all StyleCop and FxCop messages.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/Configuration/OAuthConsumerSecuritySettingsElement.cs2
-rw-r--r--src/DotNetOpenAuth/GlobalSuppressions.cs1
-rw-r--r--src/DotNetOpenAuth/Messaging/MessagingUtilities.cs6
-rw-r--r--src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs1
-rw-r--r--src/DotNetOpenAuth/OAuth/Messages/UnauthorizedTokenResponse.cs2
-rw-r--r--src/DotNetOpenAuth/OAuth/Protocol.cs2
-rw-r--r--src/DotNetOpenAuth/OAuth/VerificationCodeFormat.cs4
7 files changed, 15 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth/Configuration/OAuthConsumerSecuritySettingsElement.cs b/src/DotNetOpenAuth/Configuration/OAuthConsumerSecuritySettingsElement.cs
index 5e75390..38a183a 100644
--- a/src/DotNetOpenAuth/Configuration/OAuthConsumerSecuritySettingsElement.cs
+++ b/src/DotNetOpenAuth/Configuration/OAuthConsumerSecuritySettingsElement.cs
@@ -8,6 +8,7 @@ namespace DotNetOpenAuth.Configuration {
using System;
using System.Collections.Generic;
using System.Configuration;
+ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using DotNetOpenAuth.OAuth;
@@ -26,6 +27,7 @@ namespace DotNetOpenAuth.Configuration {
/// Initializes a programmatically manipulatable bag of these security settings with the settings from the config file.
/// </summary>
/// <returns>The newly created security settings object.</returns>
+ [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "By design")]
internal ConsumerSecuritySettings CreateSecuritySettings() {
return new ConsumerSecuritySettings();
}
diff --git a/src/DotNetOpenAuth/GlobalSuppressions.cs b/src/DotNetOpenAuth/GlobalSuppressions.cs
index b05a879..c99fbfc 100644
--- a/src/DotNetOpenAuth/GlobalSuppressions.cs
+++ b/src/DotNetOpenAuth/GlobalSuppressions.cs
@@ -41,3 +41,4 @@
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames", Justification = "We sign it when producing drops.")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "DotNetOpenAuth.Messaging.Reflection")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "oauthverifier", Scope = "resource", Target = "DotNetOpenAuth.OAuth.OAuthStrings.resources")]
diff --git a/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs
index 879af03..1cb2177 100644
--- a/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs
+++ b/src/DotNetOpenAuth/Messaging/MessagingUtilities.cs
@@ -767,7 +767,8 @@ namespace DotNetOpenAuth.Messaging {
/// <summary>
/// Ensures that UTC times are converted to local times. Unspecified kinds are unchanged.
/// </summary>
- /// <returns>Local time.</returns>
+ /// <param name="value">The date-time to convert.</param>
+ /// <returns>The date-time in local time.</returns>
internal static DateTime ToLocalTimeSafe(this DateTime value) {
if (value.Kind == DateTimeKind.Unspecified) {
return value;
@@ -779,7 +780,8 @@ namespace DotNetOpenAuth.Messaging {
/// <summary>
/// Ensures that local times are converted to UTC times. Unspecified kinds are unchanged.
/// </summary>
- /// <returns>UTC time.</returns>
+ /// <param name="value">The date-time to convert.</param>
+ /// <returns>The date-time in UTC time.</returns>
internal static DateTime ToUniversalTimeSafe(this DateTime value) {
if (value.Kind == DateTimeKind.Unspecified) {
return value;
diff --git a/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs b/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs
index 2487845..f19d4f5 100644
--- a/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs
+++ b/src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs
@@ -307,7 +307,6 @@ namespace DotNetOpenAuth.OAuth.ChannelElements {
/// <para>This method implements OAuth 1.0 section 5.2, item #1 (described in section 5.4).</para>
/// </remarks>
private HttpWebRequest InitializeRequestAsAuthHeader(IDirectedProtocolMessage requestMessage) {
- var protocol = Protocol.Lookup(requestMessage.Version);
var dictionary = this.MessageDescriptions.GetAccessor(requestMessage);
// copy so as to not modify original
diff --git a/src/DotNetOpenAuth/OAuth/Messages/UnauthorizedTokenResponse.cs b/src/DotNetOpenAuth/OAuth/Messages/UnauthorizedTokenResponse.cs
index 8ccd8e3..ce09213 100644
--- a/src/DotNetOpenAuth/OAuth/Messages/UnauthorizedTokenResponse.cs
+++ b/src/DotNetOpenAuth/OAuth/Messages/UnauthorizedTokenResponse.cs
@@ -89,6 +89,8 @@ namespace DotNetOpenAuth.OAuth.Messages {
/// <summary>
/// Gets a value indicating whether the Service Provider recognized the callback parameter in the request.
/// </summary>
+ [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Message serialization invoked.")]
+ [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Message parts must be instance members.")]
[MessagePart("oauth_callback_confirmed", IsRequired = true, MinVersion = Protocol.V10aVersion)]
private bool CallbackConfirmed {
get { return true; }
diff --git a/src/DotNetOpenAuth/OAuth/Protocol.cs b/src/DotNetOpenAuth/OAuth/Protocol.cs
index f535b10..cd4e486 100644
--- a/src/DotNetOpenAuth/OAuth/Protocol.cs
+++ b/src/DotNetOpenAuth/OAuth/Protocol.cs
@@ -8,6 +8,7 @@ namespace DotNetOpenAuth.OAuth {
using System;
using System.Collections.Generic;
using System.Diagnostics;
+ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using DotNetOpenAuth.Messaging;
@@ -24,6 +25,7 @@ namespace DotNetOpenAuth.OAuth {
/// <summary>
/// OAuth 1.0a specification
/// </summary>
+ [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "a", Justification = "By design.")]
V10a,
}
diff --git a/src/DotNetOpenAuth/OAuth/VerificationCodeFormat.cs b/src/DotNetOpenAuth/OAuth/VerificationCodeFormat.cs
index d25c988..3afd44e 100644
--- a/src/DotNetOpenAuth/OAuth/VerificationCodeFormat.cs
+++ b/src/DotNetOpenAuth/OAuth/VerificationCodeFormat.cs
@@ -5,6 +5,8 @@
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OAuth {
+ using System.Diagnostics.CodeAnalysis;
+
/// <summary>
/// The different formats a user authorization verifier code can take
/// in order to be as secure as possible while being compatible with
@@ -33,6 +35,8 @@ namespace DotNetOpenAuth.OAuth {
/// Some letters and numbers will be skipped where they are visually similar
/// enough that they can be difficult to distinguish when displayed with most fonts.
/// </remarks>
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Alikes", Justification = "Breaking change of existing API")]
+ [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "AlphaNumeric", Justification = "Breaking change of existing API")]
AlphaNumericNoLookAlikes,
/// <summary>