Skip to content

Commit bf73f1e

Browse files
Christoph BauerChristoph Bauer
authored andcommitted
Enable IAsyncEnumerable for netframework
1 parent a972419 commit bf73f1e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/NetMQ.Tests/ClientServer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public async Task AsyncWithCancellationToken()
8282
await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await server.ReceiveStringAsync(source.Token));
8383
}
8484

85-
#if NETSTANDARD || NET
8685
[Fact(Timeout = 120)]
8786
public async Task AsyncEnumerableCanceled()
8887
{
@@ -155,6 +154,6 @@ public async Task AsyncEnumerable()
155154

156155
Assert.Equal(15002, totalCount);
157156
}
158-
#endif
157+
159158
}
160159
}

src/NetMQ/NetMQ.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@
4545
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
4646
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
4747
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
48+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.6" />
4849
<Reference Include="System.ServiceModel" />
4950
<Reference Include="System" />
5051
<Reference Include="Microsoft.CSharp" />
52+
5153
</ItemGroup>
5254

5355
<ItemGroup>

src/NetMQ/RoutingIdSocketExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,6 @@ public static bool TryReceiveString(this IRoutingIdSocket socket, TimeSpan timeo
564564

565565
#region AsyncEnumerable
566566

567-
#if NETSTANDARD || NET
568567

569568
/// <summary>
570569
/// Provides a consuming IAsyncEnumerable for receiving messages from the socket.
@@ -583,7 +582,6 @@ public static bool TryReceiveString(this IRoutingIdSocket socket, TimeSpan timeo
583582
}
584583
}
585584

586-
#endif
587585

588586
#endregion
589587

0 commit comments

Comments
 (0)