Skip to content

Commit 75a72ce

Browse files
authored
Merge pull request #763 from bording/public-api-cleanup-round-2
Public api cleanup round 2
2 parents c0178a2 + a801c45 commit 75a72ce

Some content is hidden

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

41 files changed

+149
-170
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ public void EmitMethodArgumentReader()
941941
EmitLine(" return result;");
942942
EmitLine(" }");
943943
EmitLine("");
944-
EmitLine(" throw new Client.Impl.UnknownClassOrMethodException(classId, methodId);");
944+
EmitLine(" throw new Client.Exceptions.UnknownClassOrMethodException(classId, methodId);");
945945
EmitLine(" }");
946946
EmitLine("");
947947
EmitLine(" internal Client.Impl.MethodBase DecodeMethodFrom(ushort classId, ushort methodId)");
@@ -974,7 +974,7 @@ public void EmitContentHeaderReader()
974974
EmitLine($" case {c.Index}: return new {MangleClass(c.Name)}Properties();");
975975
}
976976
}
977-
EmitLine(" default: throw new Client.Impl.UnknownClassOrMethodException(classId, 0);");
977+
EmitLine(" default: throw new Client.Exceptions.UnknownClassOrMethodException(classId, 0);");
978978
EmitLine(" }");
979979
EmitLine(" }");
980980
}

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

Lines changed: 5 additions & 5 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.
@@ -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
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646
using RabbitMQ.Client.Events;
4747
using RabbitMQ.Client.Exceptions;
48+
using RabbitMQ.Client.Impl;
4849

4950
namespace RabbitMQ.Client
5051
{
@@ -65,7 +66,7 @@ namespace RabbitMQ.Client
6566
/// appropriate.
6667
/// </para>
6768
/// </remarks>
68-
public interface IConnection : NetworkConnection, IDisposable
69+
public interface IConnection : INetworkConnection, IDisposable
6970
{
7071
/// <summary>
7172
/// The maximum channel number this connection supports (0 if unlimited).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public interface IConnectionFactory
101101
/// Given a list of mechanism names supported by the server, select a preferred mechanism,
102102
/// or null if we have none in common.
103103
/// </summary>
104-
AuthMechanismFactory AuthMechanismFactory(IList<string> mechanismNames);
104+
IAuthMechanismFactory AuthMechanismFactory(IList<string> mechanismNames);
105105

106106
/// <summary>
107107
/// Create a connection to the specified endpoint.

projects/client/RabbitMQ.Client/src/client/api/NetworkConnection.cs renamed to projects/client/RabbitMQ.Client/src/client/api/INetworkConnection.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
/// Common interface for network (TCP/IP) connection classes.
4545
/// </summary>
46-
public interface NetworkConnection
46+
public interface INetworkConnection
4747
{
4848
/// <summary>
4949
/// Local port.

0 commit comments

Comments
 (0)