Skip to content

Commit 1485519

Browse files
committed
Approve API changes
1 parent 887a969 commit 1485519

File tree

1 file changed

+52
-68
lines changed

1 file changed

+52
-68
lines changed

projects/client/Unit/src/unit/APIApproval.Approve.approved.txt

Lines changed: 52 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ namespace RabbitMQ.Client
2929
public long UnixTime { get; }
3030
public override string ToString() { }
3131
}
32-
public class AmqpVersion
33-
{
34-
public AmqpVersion(int major, int minor) { }
35-
public int Major { get; }
36-
public int Minor { get; }
37-
public override bool Equals(object other) { }
38-
public override int GetHashCode() { }
39-
public override string ToString() { }
40-
}
4132
public class AsyncDefaultBasicConsumer : RabbitMQ.Client.IAsyncBasicConsumer, RabbitMQ.Client.IBasicConsumer
4233
{
4334
public AsyncDefaultBasicConsumer() { }
@@ -54,15 +45,6 @@ namespace RabbitMQ.Client
5445
public virtual System.Threading.Tasks.Task HandleModelShutdown(object model, RabbitMQ.Client.ShutdownEventArgs reason) { }
5546
public virtual System.Threading.Tasks.Task OnCancel(params string[] consumerTags) { }
5647
}
57-
public interface AuthMechanism
58-
{
59-
byte[] handleChallenge(byte[] challenge, RabbitMQ.Client.IConnectionFactory factory);
60-
}
61-
public interface AuthMechanismFactory
62-
{
63-
string Name { get; }
64-
RabbitMQ.Client.AuthMechanism GetInstance();
65-
}
6648
public class BasicGetResult
6749
{
6850
public BasicGetResult(ulong deliveryTag, bool redelivered, string exchange, string routingKey, uint messageCount, RabbitMQ.Client.IBasicProperties basicProperties, System.ReadOnlyMemory<byte> body) { }
@@ -74,25 +56,19 @@ namespace RabbitMQ.Client
7456
public bool Redelivered { get; }
7557
public string RoutingKey { get; }
7658
}
77-
public class BinaryTableValue
78-
{
79-
public BinaryTableValue() { }
80-
public BinaryTableValue(byte[] bytes) { }
81-
public byte[] Bytes { get; set; }
82-
}
8359
public sealed class ConnectionFactory : RabbitMQ.Client.ConnectionFactoryBase, RabbitMQ.Client.IAsyncConnectionFactory, RabbitMQ.Client.IConnectionFactory
8460
{
8561
public const ushort DefaultChannelMax = 2047;
8662
public const uint DefaultFrameMax = 0u;
8763
public const string DefaultPass = "guest";
8864
public const string DefaultUser = "guest";
8965
public const string DefaultVHost = "/";
90-
public static readonly System.Collections.Generic.IList<RabbitMQ.Client.AuthMechanismFactory> DefaultAuthMechanisms;
66+
public static readonly System.Collections.Generic.IList<RabbitMQ.Client.IAuthMechanismFactory> DefaultAuthMechanisms;
9167
public static readonly System.TimeSpan DefaultConnectionTimeout;
9268
public static readonly System.TimeSpan DefaultHeartbeat;
9369
public ConnectionFactory() { }
9470
public System.Security.Authentication.SslProtocols AmqpUriSslProtocols { get; set; }
95-
public System.Collections.Generic.IList<RabbitMQ.Client.AuthMechanismFactory> AuthMechanisms { get; set; }
71+
public System.Collections.Generic.IList<RabbitMQ.Client.IAuthMechanismFactory> AuthMechanisms { get; set; }
9672
public bool AutomaticRecoveryEnabled { get; set; }
9773
public System.Collections.Generic.IDictionary<string, object> ClientProperties { get; set; }
9874
public string ClientProvidedName { get; set; }
@@ -119,7 +95,7 @@ namespace RabbitMQ.Client
11995
public string VirtualHost { get; set; }
12096
public static System.Net.Sockets.AddressFamily DefaultAddressFamily { get; set; }
12197
public static System.Security.Authentication.SslProtocols DefaultAmqpUriSslProtocols { get; set; }
122-
public RabbitMQ.Client.AuthMechanismFactory AuthMechanismFactory(System.Collections.Generic.IList<string> mechanismNames) { }
98+
public RabbitMQ.Client.IAuthMechanismFactory AuthMechanismFactory(System.Collections.Generic.IList<string> mechanismNames) { }
12399
public RabbitMQ.Client.IConnection CreateConnection() { }
124100
public RabbitMQ.Client.IConnection CreateConnection(System.Collections.Generic.IList<RabbitMQ.Client.AmqpTcpEndpoint> endpoints) { }
125101
public RabbitMQ.Client.IConnection CreateConnection(System.Collections.Generic.IList<string> hostnames) { }
@@ -134,13 +110,6 @@ namespace RabbitMQ.Client
134110
public ConnectionFactoryBase() { }
135111
public static RabbitMQ.Client.ITcpClient DefaultSocketFactory(System.Net.Sockets.AddressFamily addressFamily) { }
136112
}
137-
public class ConsumerWorkService
138-
{
139-
public ConsumerWorkService() { }
140-
public void AddWork(RabbitMQ.Client.IModel model, System.Action fn) { }
141-
public void StopWork() { }
142-
public void StopWork(RabbitMQ.Client.IModel model) { }
143-
}
144113
public class DefaultBasicConsumer : RabbitMQ.Client.IBasicConsumer
145114
{
146115
public DefaultBasicConsumer() { }
@@ -174,16 +143,16 @@ namespace RabbitMQ.Client
174143
public const string Topic = "topic";
175144
public static System.Collections.Generic.ICollection<string> All() { }
176145
}
177-
public class ExternalMechanism : RabbitMQ.Client.AuthMechanism
146+
public class ExternalMechanism : RabbitMQ.Client.IAuthMechanism
178147
{
179148
public ExternalMechanism() { }
180149
public byte[] handleChallenge(byte[] challenge, RabbitMQ.Client.IConnectionFactory factory) { }
181150
}
182-
public class ExternalMechanismFactory : RabbitMQ.Client.AuthMechanismFactory
151+
public class ExternalMechanismFactory : RabbitMQ.Client.IAuthMechanismFactory
183152
{
184153
public ExternalMechanismFactory() { }
185154
public string Name { get; }
186-
public RabbitMQ.Client.AuthMechanism GetInstance() { }
155+
public RabbitMQ.Client.IAuthMechanism GetInstance() { }
187156
}
188157
public static class Headers
189158
{
@@ -216,7 +185,16 @@ namespace RabbitMQ.Client
216185
{
217186
bool DispatchConsumersAsync { get; set; }
218187
}
219-
public interface IAutorecoveringConnection : RabbitMQ.Client.IConnection, RabbitMQ.Client.NetworkConnection, System.IDisposable
188+
public interface IAuthMechanism
189+
{
190+
byte[] handleChallenge(byte[] challenge, RabbitMQ.Client.IConnectionFactory factory);
191+
}
192+
public interface IAuthMechanismFactory
193+
{
194+
string Name { get; }
195+
RabbitMQ.Client.IAuthMechanism GetInstance();
196+
}
197+
public interface IAutorecoveringConnection : RabbitMQ.Client.IConnection, RabbitMQ.Client.INetworkConnection, System.IDisposable
220198
{
221199
event System.EventHandler<RabbitMQ.Client.Events.ConnectionRecoveryErrorEventArgs> ConnectionRecoveryError;
222200
event System.EventHandler<System.EventArgs> RecoverySucceeded;
@@ -283,13 +261,13 @@ namespace RabbitMQ.Client
283261
void Add(string exchange, string routingKey, bool mandatory, RabbitMQ.Client.IBasicProperties properties, byte[] body);
284262
void Publish();
285263
}
286-
public interface IConnection : RabbitMQ.Client.NetworkConnection, System.IDisposable
264+
public interface IConnection : RabbitMQ.Client.INetworkConnection, System.IDisposable
287265
{
288266
ushort ChannelMax { get; }
289267
System.Collections.Generic.IDictionary<string, object> ClientProperties { get; }
290268
string ClientProvidedName { get; }
291269
RabbitMQ.Client.ShutdownEventArgs CloseReason { get; }
292-
RabbitMQ.Client.ConsumerWorkService ConsumerWorkService { get; }
270+
RabbitMQ.Client.Impl.ConsumerWorkService ConsumerWorkService { get; }
293271
RabbitMQ.Client.AmqpTcpEndpoint Endpoint { get; }
294272
uint FrameMax { get; }
295273
System.TimeSpan Heartbeat { get; }
@@ -329,7 +307,7 @@ namespace RabbitMQ.Client
329307
bool UseBackgroundThreadsForIO { get; set; }
330308
string UserName { get; set; }
331309
string VirtualHost { get; set; }
332-
RabbitMQ.Client.AuthMechanismFactory AuthMechanismFactory(System.Collections.Generic.IList<string> mechanismNames);
310+
RabbitMQ.Client.IAuthMechanismFactory AuthMechanismFactory(System.Collections.Generic.IList<string> mechanismNames);
333311
RabbitMQ.Client.IConnection CreateConnection();
334312
RabbitMQ.Client.IConnection CreateConnection(System.Collections.Generic.IList<RabbitMQ.Client.AmqpTcpEndpoint> endpoints);
335313
RabbitMQ.Client.IConnection CreateConnection(System.Collections.Generic.IList<string> hostnames);
@@ -437,6 +415,11 @@ namespace RabbitMQ.Client
437415
public static void QueueDeleteNoWait(this RabbitMQ.Client.IModel model, string queue, bool ifUnused = false, bool ifEmpty = false) { }
438416
public static void QueueUnbind(this RabbitMQ.Client.IModel model, string queue, string exchange, string routingKey, System.Collections.Generic.IDictionary<string, object> arguments = null) { }
439417
}
418+
public interface INetworkConnection
419+
{
420+
int LocalPort { get; }
421+
int RemotePort { get; }
422+
}
440423
public interface IProtocol
441424
{
442425
string ApiName { get; }
@@ -476,27 +459,16 @@ namespace RabbitMQ.Client
476459
System.Threading.Tasks.Task ConnectAsync(string host, int port);
477460
System.Net.Sockets.NetworkStream GetStream();
478461
}
479-
public interface NetworkConnection
480-
{
481-
int LocalPort { get; }
482-
int RemotePort { get; }
483-
}
484-
public class PlainMechanism : RabbitMQ.Client.AuthMechanism
462+
public class PlainMechanism : RabbitMQ.Client.IAuthMechanism
485463
{
486464
public PlainMechanism() { }
487465
public byte[] handleChallenge(byte[] challenge, RabbitMQ.Client.IConnectionFactory factory) { }
488466
}
489-
public class PlainMechanismFactory : RabbitMQ.Client.AuthMechanismFactory
467+
public class PlainMechanismFactory : RabbitMQ.Client.IAuthMechanismFactory
490468
{
491469
public PlainMechanismFactory() { }
492470
public string Name { get; }
493-
public RabbitMQ.Client.AuthMechanism GetInstance() { }
494-
}
495-
public class ProtocolViolationException : RabbitMQ.Client.Exceptions.RabbitMQClientException
496-
{
497-
public ProtocolViolationException() { }
498-
public ProtocolViolationException(string message) { }
499-
public ProtocolViolationException(string message, System.Exception inner) { }
471+
public RabbitMQ.Client.IAuthMechanism GetInstance() { }
500472
}
501473
public static class Protocols
502474
{
@@ -546,10 +518,6 @@ namespace RabbitMQ.Client
546518
public System.Exception Exception { get; set; }
547519
public override string ToString() { }
548520
}
549-
public class SslHelper
550-
{
551-
public static System.IO.Stream TcpUpgrade(System.IO.Stream tcpStream, RabbitMQ.Client.SslOption options) { }
552-
}
553521
public class SslOption
554522
{
555523
public SslOption() { }
@@ -565,10 +533,6 @@ namespace RabbitMQ.Client
565533
public string ServerName { get; set; }
566534
public System.Security.Authentication.SslProtocols Version { get; set; }
567535
}
568-
public class TopologyRecoveryException : RabbitMQ.Client.Exceptions.RabbitMQClientException
569-
{
570-
public TopologyRecoveryException(string message, System.Exception cause) { }
571-
}
572536
}
573537
namespace RabbitMQ.Client.Events
574538
{
@@ -696,7 +660,7 @@ namespace RabbitMQ.Client.Exceptions
696660
{
697661
public BrokerUnreachableException(System.Exception Inner) { }
698662
}
699-
public class ChannelAllocationException : RabbitMQ.Client.ProtocolViolationException
663+
public class ChannelAllocationException : RabbitMQ.Client.Exceptions.ProtocolViolationException
700664
{
701665
public ChannelAllocationException() { }
702666
public ChannelAllocationException(int channel) { }
@@ -708,7 +672,7 @@ namespace RabbitMQ.Client.Exceptions
708672
public int Channel { get; }
709673
public override ushort ReplyCode { get; }
710674
}
711-
public class ConnectFailureException : RabbitMQ.Client.ProtocolViolationException
675+
public class ConnectFailureException : RabbitMQ.Client.Exceptions.ProtocolViolationException
712676
{
713677
public ConnectFailureException(string msg, System.Exception inner) { }
714678
}
@@ -749,14 +713,20 @@ namespace RabbitMQ.Client.Exceptions
749713
public abstract ushort ReplyCode { get; }
750714
public virtual RabbitMQ.Client.ShutdownEventArgs ShutdownReason { get; }
751715
}
752-
public class ProtocolVersionMismatchException : RabbitMQ.Client.ProtocolViolationException
716+
public class ProtocolVersionMismatchException : RabbitMQ.Client.Exceptions.ProtocolViolationException
753717
{
754718
public ProtocolVersionMismatchException(int clientMajor, int clientMinor, int serverMajor, int serverMinor) { }
755719
public int ClientMajor { get; }
756720
public int ClientMinor { get; }
757721
public int ServerMajor { get; }
758722
public int ServerMinor { get; }
759723
}
724+
public class ProtocolViolationException : RabbitMQ.Client.Exceptions.RabbitMQClientException
725+
{
726+
public ProtocolViolationException() { }
727+
public ProtocolViolationException(string message) { }
728+
public ProtocolViolationException(string message, System.Exception inner) { }
729+
}
760730
public abstract class RabbitMQClientException : System.Exception
761731
{
762732
protected RabbitMQClientException() { }
@@ -773,11 +743,15 @@ namespace RabbitMQ.Client.Exceptions
773743
public SyntaxErrorException(string message) { }
774744
public override ushort ReplyCode { get; }
775745
}
746+
public class TopologyRecoveryException : RabbitMQ.Client.Exceptions.RabbitMQClientException
747+
{
748+
public TopologyRecoveryException(string message, System.Exception cause) { }
749+
}
776750
public class UnexpectedFrameException : RabbitMQ.Client.Exceptions.HardProtocolException
777751
{
778752
public override ushort ReplyCode { get; }
779753
}
780-
public class UnexpectedMethodException : RabbitMQ.Client.ProtocolViolationException
754+
public class UnexpectedMethodException : RabbitMQ.Client.Exceptions.ProtocolViolationException
781755
{
782756
public UnexpectedMethodException(RabbitMQ.Client.IMethod method) { }
783757
public RabbitMQ.Client.IMethod Method { get; }
@@ -801,13 +775,23 @@ namespace RabbitMQ.Client.Exceptions
801775
public string FieldName { get; }
802776
public string MethodName { get; }
803777
}
804-
public class WireFormattingException : RabbitMQ.Client.ProtocolViolationException
778+
public class WireFormattingException : RabbitMQ.Client.Exceptions.ProtocolViolationException
805779
{
806780
public WireFormattingException(string message) { }
807781
public WireFormattingException(string message, object offender) { }
808782
public object Offender { get; }
809783
}
810784
}
785+
namespace RabbitMQ.Client.Impl
786+
{
787+
public class ConsumerWorkService
788+
{
789+
public ConsumerWorkService() { }
790+
public void AddWork(RabbitMQ.Client.IModel model, System.Action fn) { }
791+
public void StopWork() { }
792+
public void StopWork(RabbitMQ.Client.IModel model) { }
793+
}
794+
}
811795
namespace RabbitMQ.Client.Logging
812796
{
813797
[System.Diagnostics.Tracing.EventSource(Name="rabbitmq-dotnet-client")]

0 commit comments

Comments
 (0)