Skip to content

Commit a5eaa74

Browse files
authored
Set LangVersion and annotate #nullable to avoid build errors and warnings (#3)
1 parent 5e60a5a commit a5eaa74

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

BetterStack.Logs.Serilog.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
</PropertyGroup>
1616

1717
<PropertyGroup>
18+
<LangVersion>8.0</LangVersion>
1819
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
1920
<DefaultItemExcludes>$(DefaultItemExcludes);example-project/**;dashboard.png</DefaultItemExcludes>
2021
</PropertyGroup>

BetterStack.Logs.Serilog/BetterStackHttpClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public virtual void Configure(IConfiguration configuration)
4040
/// <inheritdoc />
4141
public virtual async Task<HttpResponseMessage> PostAsync(string requestUri, Stream contentStream)
4242
{
43-
using var content = new StreamContent(contentStream);
43+
var content = new StreamContent(contentStream);
4444
content.Headers.Add("Content-Type", "application/json");
4545

4646
var response = await httpClient

BetterStack.Logs.Serilog/LoggerSinkConfigurationExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#nullable enable
2+
13
using BetterStack.Logs.Serilog;
24
using Serilog.Configuration;
35
using Serilog.Core;

0 commit comments

Comments
 (0)