summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Protocol.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-13 17:20:53 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-13 17:20:53 -0700
commit09722c436047dccfb6b6294906013786f78d5d53 (patch)
treeb266c794ee5662235063e0ec37d6b938674084f6 /src/DotNetOAuth/Protocol.cs
parentf665e1e639319918385fcc8397f8c0d5009e3bdd (diff)
downloadDotNetOpenAuth-09722c436047dccfb6b6294906013786f78d5d53.zip
DotNetOpenAuth-09722c436047dccfb6b6294906013786f78d5d53.tar.gz
DotNetOpenAuth-09722c436047dccfb6b6294906013786f78d5d53.tar.bz2
Refactored several Messaging classes into the Messaging.Bindings namespace.
Diffstat (limited to 'src/DotNetOAuth/Protocol.cs')
-rw-r--r--src/DotNetOAuth/Protocol.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Protocol.cs b/src/DotNetOAuth/Protocol.cs
index f3dc3b6..7d91b6c 100644
--- a/src/DotNetOAuth/Protocol.cs
+++ b/src/DotNetOAuth/Protocol.cs
@@ -71,5 +71,17 @@ namespace DotNetOAuth {
internal string AuthorizationHeaderScheme {
get { return this.authorizationHeaderScheme; }
}
+
+ /// <summary>
+ /// Gets an instance of <see cref="Protocol"/> given a <see cref="Version"/>.
+ /// </summary>
+ /// <param name="version">The version of the protocol that is desired.</param>
+ /// <returns>The <see cref="Protocol"/> instance representing the requested version.</returns>
+ internal static Protocol Lookup(Version version) {
+ switch (version.Major) {
+ case 1: return Protocol.V10;
+ default: throw new ArgumentOutOfRangeException("version");
+ }
+ }
}
}