From 2975c6581018d0cfa48511508364cc8b79a98dd9 Mon Sep 17 00:00:00 2001 From: EntityFX Date: Thu, 24 Oct 2024 18:57:56 +0300 Subject: [PATCH] Update BenchmarkBase.cs Fix net core app --- .../EntityFX.NetBenchamarks.Core/Generic/BenchmarkBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dotnet/EntityFX.NetBenchamarks.Core/Generic/BenchmarkBase.cs b/src/dotnet/EntityFX.NetBenchamarks.Core/Generic/BenchmarkBase.cs index aa425f8..b123dd2 100644 --- a/src/dotnet/EntityFX.NetBenchamarks.Core/Generic/BenchmarkBase.cs +++ b/src/dotnet/EntityFX.NetBenchamarks.Core/Generic/BenchmarkBase.cs @@ -3,7 +3,7 @@ using System.IO; using System.Linq; -#if NETSTANDARD2_0 || NET45 +#if NETSTANDARD2_0 || NET45 || NETCOREAPP using System.Threading.Tasks; #endif @@ -53,7 +53,7 @@ protected void DoOutput(BenchResult result) if (result.Output == null) { return; } -#if NETSTANDARD2_0 || NET45 +#if NETSTANDARD2_0 || NET45 || NETCOREAPP File.WriteAllText(string.Format("{0}.log",GetType().Name) , result.Output); #else using (var sw = new StreamWriter(string.Format("{0}.log", GetType().Name))) @@ -87,7 +87,7 @@ public virtual void Warmup(double aspect) } -#if NETSTANDARD2_0 || NET45 +#if NETSTANDARD2_0 || NET45 || NETCOREAPP protected virtual BenchResult[] BenchInParallel( Func buildFunc, Func benchFunc,