summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Protocol.cs
diff options
context:
space:
mode:
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");
+ }
+ }
}
}