-Refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net46</TargetFramework>
|
||||
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
|
||||
<RootNamespace>Newtonsoft.Json.TestConsole</RootNamespace>
|
||||
<AssemblyName>Newtonsoft.Json.TestConsole</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -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