Skip to content

Commit 72ba0bb

Browse files
Christoph BauerChristoph Bauer
authored andcommitted
.NET8 as Framework target added
This is needed for addition Pull Request using Linux Features (TCP KeepAlive)
1 parent 5a3a2d0 commit 72ba0bb

22 files changed

+30
-49
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ addons:
1010

1111
script:
1212
- dotnet restore src/NetMQ.sln
13-
- dotnet build -v q -f netstandard2.0 src/NetMQ/NetMQ.csproj
13+
- dotnet build -v q -f netstandard2.1 src/NetMQ/NetMQ.csproj
1414
- dotnet test -v n --logger "Console;noprogress=true" -p:ParallelizeTestCollections=false -f netcoreapp2.1 --filter Category!=Beacon src/NetMQ.Tests/NetMQ.Tests.csproj -- RunConfiguration.ReporterSwitch=verbose
1515

src/NetMQ/Annotations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE.md file in the project root for more information.
22

3-
#if !NETSTANDARD2_1
3+
#if NETFRAMEWORK
44

55
namespace System.Diagnostics.CodeAnalysis
66
{

src/NetMQ/AsyncReceiveExtensions.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if NETSTANDARD2_0 || NETSTANDARD2_1 || NET47
2-
1+

32
using System;
43
using System.Collections.Generic;
54
using System.Text;
@@ -308,4 +307,3 @@ public static async Task SkipMultipartMessageAsync(this NetMQSocket socket)
308307
}
309308
}
310309

311-
#endif

src/NetMQ/Core/Mechanisms/CurveClientMechanism.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ PullMsgResult ProduceInitiate(ref Msg msg)
189189

190190
VouchNoncePrefix.CopyTo(vouchNonce);
191191
using var rng = RandomNumberGenerator.Create();
192-
#if NETSTANDARD2_1
192+
#if NETSTANDARD || NET
193193
rng.GetBytes(vouchNonce.Slice(8));
194194
#else
195195
byte[] temp = new byte[16];

src/NetMQ/Core/Mechanisms/CurveServerMechanism.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ PullMsgResult ProduceWelcome(ref Msg msg)
157157
// 8-byte prefix plus 16-byte random nonce
158158
CookieNoncePrefix.CopyTo(cookieNonce);
159159
using var rng = RandomNumberGenerator.Create();
160-
#if NETSTANDARD2_1
160+
#if NETSTANDARD || NET
161161
rng.GetBytes(cookieNonce.Slice(8));
162162
#else
163163
byte[] temp = new byte[16];
@@ -184,7 +184,7 @@ PullMsgResult ProduceWelcome(ref Msg msg)
184184
// Create full nonce for encryption
185185
// 8-byte prefix plus 16-byte random nonce
186186
WelcomeNoncePrefix.CopyTo(welcomeNonce);
187-
#if NETSTANDARD2_1
187+
#if NETSTANDARD || NET
188188
rng.GetBytes(welcomeNonce.Slice(8));
189189
#else
190190
rng.GetBytes(temp);

src/NetMQ/Core/Transports/Pgm/PgmSocket.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ internal void Init()
9797
Debug.WriteLine(xMsg);
9898

9999
// If running on Microsoft Windows, suggest to the developer that he may need to install MSMQ in order to get PGM socket support.
100-
#if NETSTANDARD1_1_OR_GREATER
100+
#if NETSTANDARD || NET
101101
bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
102102
#else
103103
bool isWindows = true;

src/NetMQ/Core/Transports/Tcp/TcpListener.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You should have received a copy of the GNU Lesser General Public License
2222
using System;
2323
using System.Diagnostics;
2424
using System.Net.Sockets;
25-
#if NETSTANDARD2_0 || NETSTANDARD2_1
25+
#if NETSTANDARD || NET
2626
using System.Runtime.InteropServices;
2727
#endif
2828
using AsyncIO;
@@ -142,7 +142,7 @@ public virtual void SetAddress(string addr)
142142
}
143143
}
144144

145-
#if NETSTANDARD2_0 || NETSTANDARD2_1
145+
#if NETSTANDARD || NET
146146
// This command is failing on linux
147147
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
148148
m_handle.ExclusiveAddressUse = false;

src/NetMQ/Core/Utils/OpCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static bool Open()
2020
string val = Environment.GetEnvironmentVariable("NETQM_SUPPRESS_RDTSC");
2121
if (!string.IsNullOrEmpty(val))
2222
return false;
23-
#if NETSTANDARD1_1_OR_GREATER || NET471_OR_GREATER
23+
#if NETSTANDARD || NET || NET471_OR_GREATER
2424
if (RuntimeInformation.ProcessArchitecture != Architecture.X86 &&
2525
RuntimeInformation.ProcessArchitecture != Architecture.X64)
2626
{

src/NetMQ/Core/Utils/SpanUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ internal static class SpanUtility
77
{
88
public static string ToAscii(Span<byte> bytes)
99
{
10-
#if NETSTANDARD2_1
10+
#if NETSTANDARD || NET
1111
return Encoding.ASCII.GetString(bytes);
1212
#else
1313
return Encoding.ASCII.GetString(bytes.ToArray());

src/NetMQ/GroupSocketExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public static bool TryReceiveBytes(this IGroupInSocket socket, TimeSpan timeout,
376376

377377
#region AsyncEnumerable
378378

379-
#if NETSTANDARD2_1
379+
#if NETSTANDARD || NET
380380
/// <summary>
381381
/// Provides a consuming IAsyncEnumerable for receiving messages from the socket.
382382
/// </summary>
@@ -575,7 +575,7 @@ public static bool TryReceiveString(this IGroupInSocket socket, TimeSpan timeout
575575

576576
#region AsyncEnumerable
577577

578-
#if NETSTANDARD2_1
578+
#if NETSTANDARD || NET
579579
/// <summary>
580580
/// Provides a consuming IAsyncEnumerable for receiving messages from the socket.
581581
/// </summary>

0 commit comments

Comments
 (0)