diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-06-20 22:02:09 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-06-20 22:02:34 -0700 |
commit | 726d6d66e39a001c43cb29e3ad2861242679be2f (patch) | |
tree | 24f2114f1b06a2a571b392e57b28d05b7945d53f /src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs | |
parent | 5cc8587e6da7a804a481c1589cc86904d569a2d0 (diff) | |
download | DotNetOpenAuth-726d6d66e39a001c43cb29e3ad2861242679be2f.zip DotNetOpenAuth-726d6d66e39a001c43cb29e3ad2861242679be2f.tar.gz DotNetOpenAuth-726d6d66e39a001c43cb29e3ad2861242679be2f.tar.bz2 |
Logging banner now includes the precise build version.
Fixes #161
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs b/src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs index 7774e49..114c191 100644 --- a/src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs +++ b/src/DotNetOpenAuth.Core/Messaging/StandardWebRequestHandler.cs @@ -27,7 +27,7 @@ namespace DotNetOpenAuth.Messaging { /// <summary> /// The value to use for the User-Agent HTTP header. /// </summary> - private static string userAgentValue = Assembly.GetExecutingAssembly().GetName().Name + "/" + GetAssemblyFileVersion(); + private static string userAgentValue = Assembly.GetExecutingAssembly().GetName().Name + "/" + Util.AssemblyFileVersion; #region IWebRequestHandler Members @@ -245,19 +245,5 @@ namespace DotNetOpenAuth.Messaging { } } } - - /// <summary> - /// Gets the assembly file version of the executing assembly, otherwise falls back to the assembly version. - /// </summary> - private static string GetAssemblyFileVersion() { - var assembly = Assembly.GetExecutingAssembly(); - var attributes = assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false); - if (attributes.Length == 1) { - var fileVersionAttribute = (AssemblyFileVersionAttribute)attributes[0]; - return fileVersionAttribute.Version; - } - - return assembly.GetName().Version.ToString(); - } } } |