Skip to content

Commit dc89271

Browse files
authored
Merge branch 'main' into feat/add_activity_on_connection
2 parents 06f2d1b + a8dc8ce commit dc89271

23 files changed

+60
-33
lines changed

.github/workflows/build-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
path: |
2121
~/.nuget/packages
2222
~/AppData/Local/NuGet/v3-cache
23-
key: ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
23+
key: ${{ runner.os }}-v2-nuget-${{ hashFiles('**/*.csproj','projects/Directory.Packages.props') }}
2424
restore-keys: |
25-
${{ runner.os }}-v1-nuget-
25+
${{ runner.os }}-v2-nuget-
2626
- name: Build (Debug)
2727
run: dotnet build ${{ github.workspace }}\Build.csproj
2828
- name: Verify
@@ -142,9 +142,9 @@ jobs:
142142
path: |
143143
~/.nuget/packages
144144
~/.local/share/NuGet/v3-cache
145-
key: ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
145+
key: ${{ runner.os }}-v2-nuget-${{ hashFiles('**/*.csproj','projects/Directory.Packages.props') }}
146146
restore-keys: |
147-
${{ runner.os }}-v1-nuget-
147+
${{ runner.os }}-v2-nuget-
148148
- name: Build (Debug)
149149
run: dotnet build ${{ github.workspace }}/Build.csproj
150150
- name: Verify

projects/Directory.Packages.props

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
-->
1717
<PackageVersion Include="System.IO.Pipelines" Version="8.0.0" />
1818
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
19+
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
20+
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
1921
<PackageVersion Include="System.Threading.RateLimiting" Version="8.0.0" />
2022
<PackageVersion Include="WireMock.Net" Version="1.5.62" />
2123
<PackageVersion Include="xunit" Version="2.9.0" />
@@ -33,13 +35,9 @@
3335
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
3436
<PackageVersion Include="System.Memory" Version="4.5.5" />
3537
<PackageVersion Include="System.Threading.Channels" Version="8.0.0" />
36-
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
3738
<PackageVersion Include="System.Net.Http.Json" Version="8.0.1" />
3839
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
3940
</ItemGroup>
40-
<ItemGroup Condition="$(TargetFramework)=='net472'">
41-
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
42-
</ItemGroup>
4341
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
4442
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
4543
</ItemGroup>

projects/RabbitMQ.Client.OAuth2/CredentialsRefresherEventSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class CredentialsRefresherEventSource : EventSource
4646
public void Stopped(string name) => WriteEvent(2, "Stopped", name);
4747

4848
[Event(3)]
49-
#if NET6_0_OR_GREATER
49+
#if NET
5050
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "Parameters to this method are primitive and are trimmer safe")]
5151
#endif
5252
public void RefreshedCredentials(string name) => WriteEvent(3, "RefreshedCredentials", name);

projects/RabbitMQ.Client/DefaultEndpointResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace RabbitMQ.Client
3737
{
3838
public class DefaultEndpointResolver : IEndpointResolver
3939
{
40-
#if !NET6_0_OR_GREATER
40+
#if !NET
4141
private readonly Random s_rnd = new Random();
4242
#endif
4343
private readonly List<AmqpTcpEndpoint> _endpoints;
@@ -49,7 +49,7 @@ public DefaultEndpointResolver(IEnumerable<AmqpTcpEndpoint> tcpEndpoints)
4949

5050
public IEnumerable<AmqpTcpEndpoint> All()
5151
{
52-
#if NET6_0_OR_GREATER
52+
#if NET
5353
return _endpoints.OrderBy(item => Random.Shared.Next());
5454
#else
5555
return _endpoints.OrderBy(item => s_rnd.Next());

projects/RabbitMQ.Client/Impl/AsyncManualResetEvent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public async ValueTask WaitAsync(CancellationToken cancellationToken)
6464
cancellationToken.ThrowIfCancellationRequested();
6565

6666
CancellationTokenRegistration tokenRegistration =
67-
#if NET6_0_OR_GREATER
67+
#if NET
6868
cancellationToken.UnsafeRegister(
6969
static state =>
7070
{
@@ -87,7 +87,7 @@ public async ValueTask WaitAsync(CancellationToken cancellationToken)
8787
}
8888
finally
8989
{
90-
#if NET6_0_OR_GREATER
90+
#if NET
9191
await tokenRegistration.DisposeAsync()
9292
.ConfigureAwait(false);
9393
#else

projects/RabbitMQ.Client/Impl/AsyncRpcContinuations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public AsyncRpcContinuation(TimeSpan continuationTimeout, CancellationToken canc
6060
*/
6161
_continuationTimeoutCancellationTokenSource = new CancellationTokenSource(continuationTimeout);
6262

63-
#if NET6_0_OR_GREATER
63+
#if NET
6464
_continuationTimeoutCancellationTokenRegistration = _continuationTimeoutCancellationTokenSource.Token.UnsafeRegister((object? state) =>
6565
{
6666
var tcs = (TaskCompletionSource<T>)state!;

projects/RabbitMQ.Client/Impl/Connection.Commands.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private async ValueTask StartAndTuneAsync(CancellationToken cancellationToken)
7676
{
7777
var connectionStartCell = new TaskCompletionSource<ConnectionStartDetails?>(TaskCreationOptions.RunContinuationsAsynchronously);
7878

79-
#if NET6_0_OR_GREATER
79+
#if NET
8080
using CancellationTokenRegistration ctr = cancellationToken.UnsafeRegister((object? state) =>
8181
{
8282
if (state != null)
@@ -197,7 +197,7 @@ private IAuthMechanismFactory GetAuthMechanismFactory(string supportedMechanismN
197197
// Our list is in order of preference, the server one is not.
198198
foreach (IAuthMechanismFactory factory in _config.AuthMechanisms)
199199
{
200-
#if NET6_0_OR_GREATER
200+
#if NET
201201
if (supportedMechanismNames.Contains(factory.Name, StringComparison.OrdinalIgnoreCase))
202202
#else
203203
if (supportedMechanismNames.IndexOf(factory.Name, StringComparison.OrdinalIgnoreCase) >= 0)

projects/RabbitMQ.Client/Impl/RecordedBinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public override bool Equals(object? obj)
106106

107107
public override int GetHashCode()
108108
{
109-
#if NET6_0_OR_GREATER
109+
#if NET
110110
return HashCode.Combine(_isQueueBinding, _destination, _source, _routingKey, _arguments);
111111
#else
112112
unchecked

projects/RabbitMQ.Client/Impl/SocketFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static async Task<ITcpClient> OpenAsync(AmqpTcpEndpoint amqpTcpEndpoint,
4545
{
4646
IPAddress[] ipAddresses = await Dns.GetHostAddressesAsync(
4747
amqpTcpEndpoint.HostName
48-
#if NET6_0_OR_GREATER
48+
#if NET
4949
, cancellationToken
5050
#endif
5151
).ConfigureAwait(false);

projects/RabbitMQ.Client/Impl/SslHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static async Task<Stream> TcpUpgradeAsync(Stream tcpStream, SslOption opt
6868

6969
Task TryAuthenticating(SslOption opts)
7070
{
71-
#if NET6_0_OR_GREATER
71+
#if NET
7272
X509RevocationMode certificateRevocationCheckMode = X509RevocationMode.NoCheck;
7373
if (opts.CheckCertificateRevocation)
7474
{

0 commit comments

Comments
 (0)