summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Protocol.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-01 16:06:01 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-01 16:06:01 -0700
commit4e83c2d321f57cac5e5605097faf15bf1b46efa5 (patch)
tree3bb5c8dff9b56f1fd2e621417c0a2efcee94adbb /src/DotNetOAuth/Protocol.cs
parentd5fb1dbbc8388eac763ef85310097a618ff90437 (diff)
downloadDotNetOpenAuth-4e83c2d321f57cac5e5605097faf15bf1b46efa5.zip
DotNetOpenAuth-4e83c2d321f57cac5e5605097faf15bf1b46efa5.tar.gz
DotNetOpenAuth-4e83c2d321f57cac5e5605097faf15bf1b46efa5.tar.bz2
Lots of StyleCop changes.
Diffstat (limited to 'src/DotNetOAuth/Protocol.cs')
-rw-r--r--src/DotNetOAuth/Protocol.cs66
1 files changed, 58 insertions, 8 deletions
diff --git a/src/DotNetOAuth/Protocol.cs b/src/DotNetOAuth/Protocol.cs
index 0969a26..e96b4d2 100644
--- a/src/DotNetOAuth/Protocol.cs
+++ b/src/DotNetOAuth/Protocol.cs
@@ -1,9 +1,15 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+//-----------------------------------------------------------------------
+// <copyright file="Protocol.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
namespace DotNetOAuth {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
/// <summary>
/// Constants used in the OAuth protocol.
/// </summary>
@@ -11,13 +17,33 @@ namespace DotNetOAuth {
/// OAuth Protocol Parameter names and values are case sensitive. Each OAuth Protocol Parameters MUST NOT appear more than once per request, and are REQUIRED unless otherwise noted,
/// per OAuth 1.0 section 5.
/// </remarks>
- class Protocol {
+ internal class Protocol {
+ /// <summary>
+ /// Gets the default <see cref="Protocol"/> instance.
+ /// </summary>
internal static readonly Protocol Default = V10;
+
+ /// <summary>
+ /// The namespace to use for V1.0 of the protocol.
+ /// </summary>
+ internal const string DataContractNamespaceV10 = "http://oauth.net/core/1.0/";
+
+ /// <summary>
+ /// Gets the <see cref="Protocol"/> instance with values initialized for V1.0 of the protocol.
+ /// </summary>
internal static readonly Protocol V10 = new Protocol {
+ dataContractNamespace = DataContractNamespaceV10,
};
- internal const string DataContractNamespace = "http://oauth.net/core/1.0/";
- internal string ParameterPrefix = "oauth_";
+ /// <summary>
+ /// The namespace to use for this version of the protocol.
+ /// </summary>
+ private string dataContractNamespace;
+
+ /// <summary>
+ /// The prefix used for all key names in the protocol.
+ /// </summary>
+ private string parameterPrefix = "oauth_";
/// <summary>
/// Strings that identify the various message schemes.
@@ -25,8 +51,32 @@ namespace DotNetOAuth {
/// <remarks>
/// These strings should be checked with case INsensitivity.
/// </remarks>
- internal Dictionary<MessageScheme, string> MessageSchemes = new Dictionary<MessageScheme,string> {
+ private Dictionary<MessageScheme, string> messageSchemes = new Dictionary<MessageScheme, string> {
{ MessageScheme.AuthorizationHeaderRequest, "OAuth" },
};
+
+ /// <summary>
+ /// Gets the namespace to use for this version of the protocol.
+ /// </summary>
+ internal string DataContractNamespace {
+ get { return this.dataContractNamespace; }
+ }
+
+ /// <summary>
+ /// Gets the prefix used for all key names in the protocol.
+ /// </summary>
+ internal string ParameterPrefix {
+ get { return this.parameterPrefix; }
+ }
+
+ /// <summary>
+ /// Gets the strings that identify the various message schemes.
+ /// </summary>
+ /// <remarks>
+ /// These strings should be checked with case INsensitivity.
+ /// </remarks>
+ internal IDictionary<MessageScheme, string> MessageSchemes {
+ get { return this.messageSchemes; }
+ }
}
}