diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-08-10 16:36:52 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-01 11:02:36 -0700 |
commit | db9ec31084f57b90d861cf74cad12cb1f8c50694 (patch) | |
tree | 10b4597970a4341dabf83477da48d91bfc49c179 /src/DotNetOAuth/Util.cs | |
parent | 36fd3dd38784b51167153444561cdf7e0e1159b5 (diff) | |
download | DotNetOpenAuth-db9ec31084f57b90d861cf74cad12cb1f8c50694.zip DotNetOpenAuth-db9ec31084f57b90d861cf74cad12cb1f8c50694.tar.gz DotNetOpenAuth-db9ec31084f57b90d861cf74cad12cb1f8c50694.tar.bz2 |
Customized starter kit to DotNetOAuth.
Diffstat (limited to 'src/DotNetOAuth/Util.cs')
-rw-r--r-- | src/DotNetOAuth/Util.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Util.cs b/src/DotNetOAuth/Util.cs new file mode 100644 index 0000000..e3af5f1 --- /dev/null +++ b/src/DotNetOAuth/Util.cs @@ -0,0 +1,28 @@ +//-----------------------------------------------------------------------
+// <copyright file="Util.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+namespace DotNetOAuth {
+ using System.Globalization;
+ using System.Reflection;
+
+ /// <summary>
+ /// A grab-bag utility class.
+ /// </summary>
+ internal class Util {
+ /// <summary>
+ /// Gets a human-readable description of the library name and version, including
+ /// whether the build is an official or private one.
+ /// </summary>
+ public static string LibraryVersion {
+ get {
+ string assemblyFullName = Assembly.GetExecutingAssembly().FullName;
+ bool official = assemblyFullName.Contains("PublicKeyToken=2780ccd10d57b246");
+
+ // We use InvariantCulture since this is used for logging.
+ return string.Format(CultureInfo.InvariantCulture, "{0} ({1})", assemblyFullName, official ? "official" : "private");
+ }
+ }
+ }
+}
|