Skip to content

Commit 91f7b81

Browse files
committed
Jump on VS2019; fix BDN upgrade requirements
1 parent d4b3b32 commit 91f7b81

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: '{build}'
22
skip_tags: true
3-
image: Visual Studio 2017
3+
image: Visual Studio 2019
44
build_script:
55
- ps: ./Build.ps1
66
test: off

test/Serilog.Sinks.Async.PerformanceTests/LatencyBenchmark.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ namespace Serilog.Sinks.Async.PerformanceTests
1111
{
1212
public class LatencyBenchmark
1313
{
14-
private readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
14+
readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
1515
new MessageTemplate(new[] {new TextToken("Hello")}), new LogEventProperty[0]);
1616

17-
private Logger _syncLogger, _asyncLogger, _fileLogger, _asyncFileLogger;
17+
Logger _syncLogger, _asyncLogger, _fileLogger, _asyncFileLogger;
1818

1919
static LatencyBenchmark()
2020
{
2121
SelfLog.Enable(new TerminatingTextWriter());
2222
}
2323

24-
[Setup]
24+
[GlobalSetup]
2525
public void Reset()
2626
{
2727
foreach (var logger in new[] { _syncLogger, _asyncLogger, _fileLogger, _asyncFileLogger})

test/Serilog.Sinks.Async.PerformanceTests/SignallingSink.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
namespace Serilog.Sinks.Async.PerformanceTests
77
{
8-
internal class SignallingSink : ILogEventSink
8+
class SignallingSink : ILogEventSink
99
{
10-
private readonly int _expectedCount;
11-
private readonly ManualResetEvent _wh;
12-
private int _current;
10+
readonly int _expectedCount;
11+
readonly ManualResetEvent _wh;
12+
int _current;
1313

1414
public SignallingSink(int expectedCount)
1515
{

test/Serilog.Sinks.Async.PerformanceTests/ThroughputBenchmark.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ namespace Serilog.Sinks.Async.PerformanceTests
88
{
99
public class ThroughputBenchmark
1010
{
11-
private const int Count = 10000;
11+
const int Count = 10000;
1212

13-
private readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
13+
readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
1414
new MessageTemplate(new[] {new TextToken("Hello")}), new LogEventProperty[0]);
1515

16-
private readonly SignallingSink _signal;
17-
private Logger _syncLogger, _asyncLogger;
16+
readonly SignallingSink _signal;
17+
Logger _syncLogger, _asyncLogger;
1818

1919
public ThroughputBenchmark()
2020
{
2121
_signal = new SignallingSink(Count);
2222
}
2323

24-
[Setup]
24+
[GlobalSetup]
2525
public void Reset()
2626
{
2727
_syncLogger?.Dispose();

test/Serilog.Sinks.Async.Tests/BackgroundWorkerSinkIntegrationSpec.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class BackgroundWorkerSinkIntegrationSpec
1515
/// <summary>
1616
/// If <see cref="withDelay" />, then adds a 1sec delay before every fifth element created
1717
/// </summary>
18-
private static void CreateAudits(ILogger logger, int count, bool withDelay)
18+
static void CreateAudits(ILogger logger, int count, bool withDelay)
1919
{
2020
var delay = TimeSpan.FromMilliseconds(1000);
2121
var sw = new Stopwatch();
@@ -47,7 +47,7 @@ private static void CreateAudits(ILogger logger, int count, bool withDelay)
4747
}
4848
}
4949

50-
private static List<LogEvent> RetrieveEvents(MemorySink sink, int count)
50+
static List<LogEvent> RetrieveEvents(MemorySink sink, int count)
5151
{
5252
Debug.WriteLine("{0:h:mm:ss tt} Retrieving {1} events", DateTime.Now, count);
5353

@@ -91,9 +91,9 @@ public GivenBufferQueueAndDelays()
9191

9292
public abstract class SinkSpecBase : IDisposable
9393
{
94-
private bool _delayCreation;
95-
private Logger _logger;
96-
private MemorySink _memorySink;
94+
bool _delayCreation;
95+
Logger _logger;
96+
MemorySink _memorySink;
9797

9898
protected SinkSpecBase(bool useBufferedQueue, bool delayCreation)
9999
{

test/Serilog.Sinks.Async.Tests/BackgroundWorkerSinkSpec.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ public void MonitorParameterAffordsSinkInspectorSuitableForHealthChecking()
230230
Assert.Null(monitor.Inspector);
231231
}
232232

233-
private BackgroundWorkerSink CreateSinkWithDefaultOptions()
233+
BackgroundWorkerSink CreateSinkWithDefaultOptions()
234234
{
235235
return new BackgroundWorkerSink(_logger, 10000, false);
236236
}
237237

238-
private static LogEvent CreateEvent()
238+
static LogEvent CreateEvent()
239239
{
240240
return new LogEvent(DateTimeOffset.MaxValue, LogEventLevel.Error, null,
241241
new MessageTemplate("amessage", Enumerable.Empty<MessageTemplateToken>()),

0 commit comments

Comments
 (0)