-Refactor

This commit is contained in:
James Newton-King
2017-06-25 11:41:56 +12:00
parent b4c9b27803
commit 609a02aa4a
7 changed files with 106 additions and 95 deletions
+4 -2
View File
@@ -26,7 +26,9 @@
using System;
using System.Diagnostics;
using BenchmarkDotNet.Running;
using Newtonsoft.Json;
using Newtonsoft.Json.Tests.Benchmarks;
using System.Reflection;
namespace Newtonsoft.Json.TestConsole
{
@@ -34,8 +36,8 @@ namespace Newtonsoft.Json.TestConsole
{
public static void Main(string[] args)
{
string version = FileVersionInfo.GetVersionInfo(typeof(JsonConvert).Assembly.Location).FileVersion;
Console.WriteLine("Json.NET Version: " + version);
var attribute = (AssemblyFileVersionAttribute)typeof(JsonConvert).GetTypeInfo().Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));
Console.WriteLine("Json.NET Version: " + attribute.Version);
new BenchmarkSwitcher(new [] { typeof(LowLevelBenchmarks) }).Run(new[] { "*" });
}