Skip to content

Commit 8a46f95

Browse files
Merge branch 'master' into michac-autorec-loop-update-squash
2 parents 43bb0df + 8aed00f commit 8a46f95

File tree

77 files changed

+474
-545
lines changed

Some content is hidden

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

77 files changed

+474
-545
lines changed

ChangeLog.md renamed to CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
## Changes Between 5.2.0 and 6.0.0
22

3+
Please see the milestone for all changes:
4+
35
[GitHub `6.0.0` Milestone](https://github.com/rabbitmq/rabbitmq-dotnet-client/milestone/41?closed=1)
46

5-
## Changes Between 5.1.3 and 5.2.0
7+
## Changes Between 5.1.2 and 5.2.0
8+
9+
Please see the milestone for all changes:
610

711
[GitHub `5.2.0` Milestone](https://github.com/rabbitmq/rabbitmq-dotnet-client/milestone/42?closed=1)
812

9-
## Changes Between 5.1.2 and 5.1.3
13+
Selected highlights:
14+
15+
### Add support for `netstandard2.0`
16+
17+
GitHub Issue: https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/428
18+
GitHub PR: https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/435
1019

1120
### Re-introduce lock for all socket writes
1221

LICENSE-MPL-RabbitMQ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ EXHIBIT A -Mozilla Public License.
447447
The Original Code is RabbitMQ.
448448

449449
The Initial Developer of the Original Code is GoPivotal, Inc.
450-
Copyright (c) 2007-2014 GoPivotal, Inc. All rights reserved.''
450+
Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.''
451451

452452
[NOTE: The text of this Exhibit A may differ slightly from the text of
453453
the notices in the Source Code files of the Original Code. You should

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ as archives.
2626

2727
## Supported Platforms and .NET Releases
2828

29-
Future `6.x` versions of the library require .NET 4.6.2 or a .NET Core version implementing .NET Standard 2.0.
29+
Future `6.x` versions of the library require .NET 4.6.1 or a .NET Core version implementing .NET Standard 2.0.
3030

3131
### 5.x and 4.x
3232

@@ -39,7 +39,7 @@ For .NET Core users, 2.0 is the minimum supported version for `5.x` series.
3939

4040
## Change Log
4141

42-
See [ChangeLog.md](https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/master/ChangeLog.md).
42+
See [/CHANGELOG.md](https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/master/CHANGELOG.md).
4343

4444
## Building from Source
4545

RabbitMQDotNetClient.userprefs

Lines changed: 0 additions & 9 deletions
This file was deleted.

projects/client/Apigen/Apigen.csproj

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<TargetFramework>netcoreapp3.1</TargetFramework>
4-
<AssemblyName>Apigen</AssemblyName>
55
<OutputType>Exe</OutputType>
6-
<PackageId>Apigen</PackageId>
7-
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
8-
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
9-
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
10-
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
11-
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
12-
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
136
</PropertyGroup>
7+
148
<ItemGroup>
159
<Compile Include="..\RabbitMQ.Client\src\client\api\AmqpTimestamp.cs;..\RabbitMQ.Client\src\client\api\IBasicConsumer.cs;..\RabbitMQ.Client\src\client\api\IBasicProperties.cs;..\RabbitMQ.Client\src\client\api\IContentHeader.cs;..\RabbitMQ.Client\src\client\api\IModel.cs;..\RabbitMQ.Client\src\client\api\PublicationAddress.cs;..\RabbitMQ.Client\src\client\api\IBasicPublishBatch.cs;..\RabbitMQ.Client\src\client\api\BasicGetResult.cs;..\RabbitMQ.Client\src\client\api\QueueDeclareOk.cs;..\RabbitMQ.Client\src\client\api\ShutdownEventArgs.cs;..\RabbitMQ.Client\src\client\api\ShutdownInitiator.cs;..\RabbitMQ.Client\src\client\events\BasicReturnEventArgs.cs;..\RabbitMQ.Client\src\client\events\BasicAckEventArgs.cs;..\RabbitMQ.Client\src\client\events\BasicNackEventArgs.cs;..\RabbitMQ.Client\src\client\events\CallbackExceptionEventArgs.cs;..\RabbitMQ.Client\src\client\events\ConsumerEventArgs.cs;..\RabbitMQ.Client\src\client\events\FlowControlEventArgs.cs;..\RabbitMQ.Client\src\client\impl\IFullModel.cs" />
1610
</ItemGroup>
11+
1712
</Project>

projects/client/Apigen/properties/AssemblyInfo.cs

Lines changed: 0 additions & 63 deletions
This file was deleted.

projects/client/Apigen/src/apigen/Apigen.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public void EmitClassProperties(AmqpClass c)
637637
EmitLine($" public override ushort ProtocolClassId => {c.Index};");
638638
EmitLine($" public override string ProtocolClassName => \"{c.Name}\";");
639639
EmitLine("");
640-
EmitLine(" internal override void ReadPropertiesFrom(Client.Impl.ContentHeaderPropertyReader reader)");
640+
EmitLine(" internal override void ReadPropertiesFrom(ref Client.Impl.ContentHeaderPropertyReader reader)");
641641
EmitLine(" {");
642642
foreach (AmqpField f in c.m_Fields)
643643
{
@@ -660,7 +660,7 @@ public void EmitClassProperties(AmqpClass c)
660660
}
661661
EmitLine(" }");
662662
EmitLine("");
663-
EmitLine(" internal override void WritePropertiesTo(Client.Impl.ContentHeaderPropertyWriter writer)");
663+
EmitLine(" internal override void WritePropertiesTo(ref Client.Impl.ContentHeaderPropertyWriter writer)");
664664
EmitLine(" {");
665665
foreach (AmqpField f in c.m_Fields)
666666
{
@@ -841,15 +841,15 @@ public void EmitClassMethodImplementations(AmqpClass c)
841841
EmitLine($" public override string ProtocolMethodName => \"{c.Name}.{m.Name}\";");
842842
EmitLine($" public override bool HasContent => {(m.HasContent ? "true" : "false")};");
843843
EmitLine("");
844-
EmitLine(" public override void ReadArgumentsFrom(Client.Impl.MethodArgumentReader reader)");
844+
EmitLine(" public override void ReadArgumentsFrom(ref Client.Impl.MethodArgumentReader reader)");
845845
EmitLine(" {");
846846
foreach (AmqpField f in m.m_Fields)
847847
{
848848
EmitLine($" _{MangleMethod(f.Name)} = reader.Read{MangleClass(ResolveDomain(f.Domain))}();");
849849
}
850850
EmitLine(" }");
851851
EmitLine("");
852-
EmitLine(" public override void WriteArgumentsTo(Client.Impl.MethodArgumentWriter writer)");
852+
EmitLine(" public override void WriteArgumentsTo(ref Client.Impl.MethodArgumentWriter writer)");
853853
EmitLine(" {");
854854
foreach (AmqpField f in m.m_Fields)
855855
{
@@ -936,11 +936,12 @@ public void EmitMethodArgumentReader()
936936
EmitLine(" Client.Impl.MethodBase result = DecodeMethodFrom(classId, methodId);");
937937
EmitLine(" if(result != null)");
938938
EmitLine(" {");
939-
EmitLine(" result.ReadArgumentsFrom(new Client.Impl.MethodArgumentReader(memory.Slice(4)));");
939+
EmitLine(" Client.Impl.MethodArgumentReader reader = new Client.Impl.MethodArgumentReader(memory.Slice(4));");
940+
EmitLine(" result.ReadArgumentsFrom(ref reader);");
940941
EmitLine(" return result;");
941942
EmitLine(" }");
942943
EmitLine("");
943-
EmitLine(" throw new Client.Impl.UnknownClassOrMethodException(classId, methodId);");
944+
EmitLine(" throw new Client.Exceptions.UnknownClassOrMethodException(classId, methodId);");
944945
EmitLine(" }");
945946
EmitLine("");
946947
EmitLine(" internal Client.Impl.MethodBase DecodeMethodFrom(ushort classId, ushort methodId)");
@@ -973,7 +974,7 @@ public void EmitContentHeaderReader()
973974
EmitLine($" case {c.Index}: return new {MangleClass(c.Name)}Properties();");
974975
}
975976
}
976-
EmitLine(" default: throw new Client.Impl.UnknownClassOrMethodException(classId, 0);");
977+
EmitLine(" default: throw new Client.Exceptions.UnknownClassOrMethodException(classId, 0);");
977978
EmitLine(" }");
978979
EmitLine(" }");
979980
}
Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
3-
<Description>The RabbitMQ .NET client is the official client library for C# (and, implicitly, other .NET languages)</Description>
44
<VersionPrefix>6.0.0</VersionPrefix>
55
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
66
<NoWarn>$(NoWarn);CS1591</NoWarn>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
88
<GenerateDocumentationFile>true</GenerateDocumentationFile>
9-
<AssemblyName>RabbitMQ.Client</AssemblyName>
10-
<PackageId>RabbitMQ.Client</PackageId>
119
<PackageTags>RabbitMQ</PackageTags>
1210
<PackageIcon>icon.png</PackageIcon>
1311
<PackageProjectUrl>https://www.rabbitmq.com/dotnet.html</PackageProjectUrl>
1412
<PackageLicense>https://www.rabbitmq.com/dotnet.html</PackageLicense>
15-
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
16-
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
17-
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
18-
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
19-
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
20-
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
13+
<AssemblyTitle>RabbitMQ Client Library for .NET</AssemblyTitle>
14+
<Description>The RabbitMQ .NET client is the official client library for C# (and, implicitly, other .NET languages)</Description>
15+
<Company>VMware, Inc. or its affiliates.</Company>
16+
<Product>RabbitMQ</Product>
17+
<Copyright>Copyright © 2007-2020 VMware, Inc. or its affiliates.</Copyright>
2118
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
2219
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2320
<EmbedUntrackedSources>true</EmbedUntrackedSources>
@@ -27,22 +24,20 @@
2724
<AssemblyOriginatorKeyFile>../rabbit.snk</AssemblyOriginatorKeyFile>
2825
<SignAssembly>true</SignAssembly>
2926
</PropertyGroup>
27+
3028
<ItemGroup>
31-
<Compile Remove="build\**\*" />
32-
<Compile Include="..\..\..\gensrc\autogenerated-api-0-9-1.cs" Exclude="build\**\*;bin\**;obj\**;**\*.xproj;packages\**" />
29+
<Compile Include="..\..\..\gensrc\autogenerated-api-0-9-1.cs" />
3330
</ItemGroup>
31+
3432
<ItemGroup>
35-
<None Include="icon.png">
36-
<Pack>True</Pack>
37-
<PackagePath></PackagePath>
38-
</None>
33+
<None Remove="icon.png" />
34+
<Content Include="icon.png" PackagePath="" />
3935
</ItemGroup>
40-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
41-
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
42-
</PropertyGroup>
36+
4337
<ItemGroup>
4438
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
4539
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
4640
<PackageReference Include="System.Memory" Version="4.5.3" />
4741
</ItemGroup>
42+
4843
</Project>

projects/client/RabbitMQ.Client/src/client/api/AmqpTcpEndpoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public IProtocol Protocol
180180
public System.Net.Sockets.AddressFamily AddressFamily { get; set; } = ConnectionFactory.DefaultAddressFamily;
181181

182182
/// <summary>
183-
/// Retrieve the SSL options for this AmqpTcpEndpoint. If not set, null is returned.
183+
/// Retrieve the TLS options for this AmqpTcpEndpoint. If not set, null is returned.
184184
/// </summary>
185185
public SslOption Ssl { get; set; }
186186

projects/client/RabbitMQ.Client/src/client/api/ConnectionFactory.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ public sealed class ConnectionFactory : ConnectionFactoryBase, IAsyncConnectionF
147147
/// <summary>
148148
/// Default SASL auth mechanisms to use.
149149
/// </summary>
150-
public static readonly IList<AuthMechanismFactory> DefaultAuthMechanisms =
151-
new List<AuthMechanismFactory>() { new PlainMechanismFactory() };
150+
public static readonly IList<IAuthMechanismFactory> DefaultAuthMechanisms =
151+
new List<IAuthMechanismFactory>() { new PlainMechanismFactory() };
152152

153153
/// <summary>
154154
/// SASL auth mechanisms to use.
155155
/// </summary>
156-
public IList<AuthMechanismFactory> AuthMechanisms { get; set; } = DefaultAuthMechanisms;
156+
public IList<IAuthMechanismFactory> AuthMechanisms { get; set; } = DefaultAuthMechanisms;
157157

158158
/// <summary>
159159
/// Address family used by default.
@@ -241,7 +241,7 @@ public TimeSpan ContinuationTimeout
241241
public TimeSpan SocketWriteTimeout { get; set; } = DefaultConnectionTimeout;
242242

243243
/// <summary>
244-
/// Ssl options setting.
244+
/// TLS options setting.
245245
/// </summary>
246246
public SslOption Ssl { get; set; } = new SslOption();
247247

@@ -331,10 +331,10 @@ public Uri Uri
331331
/// Given a list of mechanism names supported by the server, select a preferred mechanism,
332332
/// or null if we have none in common.
333333
/// </summary>
334-
public AuthMechanismFactory AuthMechanismFactory(IList<string> mechanismNames)
334+
public IAuthMechanismFactory AuthMechanismFactory(IList<string> mechanismNames)
335335
{
336336
// Our list is in order of preference, the server one is not.
337-
foreach (AuthMechanismFactory factory in AuthMechanisms)
337+
foreach (IAuthMechanismFactory factory in AuthMechanisms)
338338
{
339339
string factoryName = factory.Name;
340340
if (mechanismNames.Any<string>(x => string.Equals(x, factoryName, StringComparison.OrdinalIgnoreCase)))

projects/client/RabbitMQ.Client/src/client/api/ConnectionFactoryBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
using System;
4242
using System.Net.Sockets;
43+
using RabbitMQ.Client.Impl;
4344

4445
namespace RabbitMQ.Client
4546
{

projects/client/RabbitMQ.Client/src/client/api/ExternalMechanism.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
namespace RabbitMQ.Client
4242
{
43-
public class ExternalMechanism : AuthMechanism
43+
public class ExternalMechanism : IAuthMechanism
4444
{
4545
/// <summary>
4646
/// Handle one round of challenge-response.

projects/client/RabbitMQ.Client/src/client/api/ExternalMechanismFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
namespace RabbitMQ.Client
4242
{
43-
public class ExternalMechanismFactory : AuthMechanismFactory
43+
public class ExternalMechanismFactory : IAuthMechanismFactory
4444
{
4545
/// <summary>
4646
/// The name of the authentication mechanism, as negotiated on the wire.
@@ -53,7 +53,7 @@ public string Name
5353
/// <summary>
5454
/// Return a new authentication mechanism implementation.
5555
/// </summary>
56-
public AuthMechanism GetInstance()
56+
public IAuthMechanism GetInstance()
5757
{
5858
return new ExternalMechanism();
5959
}

projects/client/RabbitMQ.Client/src/client/api/AuthMechanism.cs renamed to projects/client/RabbitMQ.Client/src/client/api/IAuthMechanism.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace RabbitMQ.Client
4343
/// <summary>
4444
/// A pluggable authentication mechanism.
4545
/// </summary>
46-
public interface AuthMechanism
46+
public interface IAuthMechanism
4747
{
4848
/// <summary>
4949
/// Handle one round of challenge-response.

projects/client/RabbitMQ.Client/src/client/api/AuthMechanismFactory.cs renamed to projects/client/RabbitMQ.Client/src/client/api/IAuthMechanismFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
namespace RabbitMQ.Client
4242
{
43-
public interface AuthMechanismFactory
43+
public interface IAuthMechanismFactory
4444
{
4545
/// <summary>
4646
/// The name of the authentication mechanism, as negotiated on the wire.
@@ -50,6 +50,6 @@ public interface AuthMechanismFactory
5050
/// <summary>
5151
/// Return a new authentication mechanism implementation.
5252
/// </summary>
53-
AuthMechanism GetInstance();
53+
IAuthMechanism GetInstance();
5454
}
5555
}

0 commit comments

Comments
 (0)