Skip to content

Commit 20dfc9c

Browse files
committed
Use standard Defines instead of custom ones
1 parent c6ed527 commit 20dfc9c

File tree

5 files changed

+4
-16
lines changed

5 files changed

+4
-16
lines changed

projects/client/RabbitMQ.Client/RabbitMQ.Client.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939
</None>
4040
</ItemGroup>
4141

42-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
43-
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
44-
</PropertyGroup>
45-
4642
<ItemGroup>
4743
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
4844
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />

projects/client/RabbitMQ.Client/src/client/impl/TcpClientAdapter.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ public virtual async Task ConnectAsync(string host, int port)
2727
throw new ArgumentException("No ip address could be resolved for " + host);
2828
}
2929

30-
#if CORECLR
3130
await _sock.ConnectAsync(ep, port).ConfigureAwait(false);
32-
#else
33-
await Task.Run(() => _sock.Connect(ep, port));
34-
#endif
3531
}
3632

3733
public virtual void Close()

projects/client/Unit/Unit.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,4 @@
1818
<PackageReference Include="PublicApiGenerator" Version="10.0.2" />
1919
</ItemGroup>
2020

21-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
22-
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
23-
</PropertyGroup>
24-
2521
</Project>

projects/client/Unit/src/unit/Fixtures.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ private Process ExecRabbitMqCtlUsingDocker(string args, string dockerMachineName
456456
UseShellExecute = false
457457
}
458458
};
459-
459+
460460
try {
461461
proc.StartInfo.FileName = "docker";
462462
proc.StartInfo.Arguments = $"exec {dockerMachineName} rabbitmqctl {args}";
@@ -545,7 +545,7 @@ internal void ReportExecFailure(string cmd, string args, string msg)
545545

546546
public static bool IsRunningOnMonoOrDotNetCore()
547547
{
548-
#if CORECLR
548+
#if NETCOREAPP
549549
return true;
550550
#else
551551
return Type.GetType("Mono.Runtime") != null;
@@ -578,7 +578,7 @@ internal void Publish(IConnection conn)
578578
//
579579
// Connection Closure
580580
//
581-
581+
582582
public class ConnectionInfo
583583
{
584584
public string Pid

projects/client/Unit/src/unit/TestAmqpUri.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private void ParseSuccess(string uri, string user, string password,
207207

208208
public static bool IsRunningOnMono()
209209
{
210-
#if CORECLR
210+
#if NETCOREAPP
211211
return false;
212212
#else
213213
return Type.GetType("Mono.Runtime") != null;

0 commit comments

Comments
 (0)