-Refactor
This commit is contained in:
@@ -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[] { "*" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user