Skip to content

Commit 5a53c64

Browse files
committed
Minor fixes of dotnet code analysis errors
1 parent 1da67f0 commit 5a53c64

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

sample/CombinedConfigDemo/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static void Main()
4949
columnOptionsSection: columnOptionsSection)
5050
.CreateLogger();
5151

52-
Log.Information("Hello {Name} from thread {ThreadId}", Environment.GetEnvironmentVariable("USERNAME"), Thread.CurrentThread.ManagedThreadId);
52+
Log.Information("Hello {Name} from thread {ThreadId}", Environment.GetEnvironmentVariable("USERNAME"), Environment.CurrentManagedThreadId);
5353

5454
Log.Warning("No coins remain at position {@Position}", new { Lat = 25, Long = 134 });
5555

sample/CustomLogEventFormatterDemo/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static void Main()
5757
{
5858
Log.Debug("Getting started");
5959

60-
Log.Information("Hello {Name} from thread {ThreadId}", Environment.GetEnvironmentVariable("USERNAME"), Thread.CurrentThread.ManagedThreadId);
60+
Log.Information("Hello {Name} from thread {ThreadId}", Environment.GetEnvironmentVariable("USERNAME"), Environment.CurrentManagedThreadId);
6161

6262
Log.Warning("No coins remain at position {@Position}", new { Lat = 25, Long = 134 });
6363

test/Serilog.Sinks.MSSqlServer.Tests/GlobalSuppressions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
[assembly: SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "Supplying string literals and not using resources is accepted within this project.", Scope = "namespaceanddescendants", Target = "Serilog.Sinks.MSSqlServer.Tests")]
99
[assembly: SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Member names must match SQL server master DB objects.", Scope = "type", Target = "~T:Serilog.Sinks.MSSqlServer.Tests.TestUtils.sp_pkey")]
1010
[assembly: SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Member names must match SQL server master DB objects.", Scope = "type", Target = "~T:Serilog.Sinks.MSSqlServer.Tests.TestUtils.SysIndex_CCI")]
11-
[assembly: SuppressMessage("Globalization", "CA1307:Specify StringComparison", Justification = "In net452 there is no Contains() overload that accepts a StringComparison specifier", Scope = "namespaceanddescendants", Target = "Serilog.Sinks.MSSqlServer.Tests")]

test/Serilog.Sinks.MSSqlServer.Tests/Sinks/MSSqlServer/Output/AdditionalColumnDataGeneratorTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ namespace Serilog.Sinks.MSSqlServer.Tests.Output
1313
[Trait(TestCategory.TraitName, TestCategory.Unit)]
1414
public class AdditionalColumnDataGeneratorTests
1515
{
16-
private readonly Dictionary<string, LogEventPropertyValue> _properties;
17-
private Mock<IColumnSimplePropertyValueResolver> _columnSimplePropertyValueResolver;
18-
private Mock<IColumnHierarchicalPropertyValueResolver> _columnHierarchicalPropertyValueResolver;
19-
private AdditionalColumnDataGenerator _sut;
16+
private readonly Mock<IColumnSimplePropertyValueResolver> _columnSimplePropertyValueResolver;
17+
private readonly Mock<IColumnHierarchicalPropertyValueResolver> _columnHierarchicalPropertyValueResolver;
18+
private readonly AdditionalColumnDataGenerator _sut;
2019

2120
public AdditionalColumnDataGeneratorTests()
2221
{
23-
_properties = new Dictionary<string, LogEventPropertyValue>();
2422
_columnSimplePropertyValueResolver = new Mock<IColumnSimplePropertyValueResolver>();
2523
_columnHierarchicalPropertyValueResolver = new Mock<IColumnHierarchicalPropertyValueResolver>();
2624
_sut = new AdditionalColumnDataGenerator(_columnSimplePropertyValueResolver.Object,

0 commit comments

Comments
 (0)