Skip to content

Commit 7ae9632

Browse files
authored
Merge pull request #886 from drewnoakes/make-nullable-default
Enable C# 8 nullable by default
2 parents ca1a3a8 + 7f70f5a commit 7ae9632

File tree

184 files changed

+292
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+292
-236
lines changed

src/Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<Project>
2+
3+
<PropertyGroup>
4+
<LangVersion>8.0</LangVersion>
5+
<Nullable>enable</Nullable>
6+
</PropertyGroup>
7+
28
<!-- Workaround for https://github.com/dotnet/sourcelink/issues/572 -->
39
<ItemGroup>
410
<SourceRoot Include="$(MSBuildThisFileDirectory)/" />
511
</ItemGroup>
12+
613
</Project>

src/NetMQ.Tests/EventDelegatorTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System;
1+
#nullable disable
2+
3+
using System;
24
using Xunit;
35

46
namespace NetMQ.Tests

src/NetMQ.Tests/ExceptionTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#nullable disable
2+
13
#if !NETCOREAPP1_0
24

35
using System.IO;

src/NetMQ.Tests/MsgTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System;
1+
#nullable disable
2+
3+
using System;
24
using Xunit;
35

46
namespace NetMQ.Tests

src/NetMQ.Tests/NetMQ.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);netcoreapp1.0;portable-net45+win8</PackageTargetFallback>
1010
<IsTestProject>true</IsTestProject>
1111
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1;net47</TargetFrameworks>
12-
<LangVersion>8</LangVersion>
1312
</PropertyGroup>
1413

1514
<PropertyGroup>

src/NetMQ.Tests/OutgoingSocketExtensionsTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System;
1+
#nullable disable
2+
3+
using System;
24
using Xunit;
35

46
namespace NetMQ.Tests

src/NetMQ.Tests/ReceivingSocketExtensionsTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System;
1+
#nullable disable
2+
3+
using System;
24
using System.Collections.Generic;
35
using System.Linq;
46
using System.Text;

src/NetMQ.Tests/RequestWithRetryTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#if !NET35
1+
#nullable disable
2+
3+
#if !NET35
24
using System;
35
using System.Diagnostics;
46
using NetMQ.Sockets;

src/NetMQ.Tests/SocketTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System;
1+
#nullable disable
2+
3+
using System;
24
using System.Collections.Generic;
35
using System.Diagnostics;
46
using System.Net;

src/NetMQ.Tests/StreamTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using Xunit;
1+
#nullable disable
2+
3+
using Xunit;
24

35
using NetMQ.Sockets;
46

0 commit comments

Comments
 (0)