Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _site
Submodule _site updated 161 files
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/api/AmqpTimestamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public AmqpTimestamp(long unixTime) : this()
/// <summary>
/// Unix time.
/// </summary>
public long UnixTime { get; private set; }
public long UnixTime { get; }

public bool Equals(AmqpTimestamp other) => UnixTime == other.UnixTime;

Expand Down
14 changes: 7 additions & 7 deletions projects/RabbitMQ.Client/client/api/BasicGetResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ public BasicGetResult(ulong deliveryTag, bool redelivered, string exchange, stri
/// <summary>
/// Retrieves the Basic-class content header properties for this message.
/// </summary>
public IBasicProperties BasicProperties { get; private set; }
public IBasicProperties BasicProperties { get; }

/// <summary>
/// Retrieves the body of this message.
/// </summary>
public ReadOnlyMemory<byte> Body { get; private set; }
public ReadOnlyMemory<byte> Body { get; }

/// <summary>
/// Retrieve the delivery tag for this message. See also <see cref="IModel.BasicAck"/>.
/// </summary>
public ulong DeliveryTag { get; private set; }
public ulong DeliveryTag { get; }

/// <summary>
/// Retrieve the exchange this message was published to.
/// </summary>
public string Exchange { get; private set; }
public string Exchange { get; }

/// <summary>
/// Retrieve the number of messages pending on the queue, excluding the message being delivered.
Expand All @@ -115,17 +115,17 @@ public BasicGetResult(ulong deliveryTag, bool redelivered, string exchange, stri
/// Note that this figure is indicative, not reliable, and can
/// change arbitrarily as messages are added to the queue and removed by other clients.
/// </remarks>
public uint MessageCount { get; private set; }
public uint MessageCount { get; }

/// <summary>
/// Retrieve the redelivered flag for this message.
/// </summary>
public bool Redelivered { get; private set; }
public bool Redelivered { get; }

/// <summary>
/// Retrieve the routing key with which this message was published.
/// </summary>
public string RoutingKey { get; private set; }
public string RoutingKey { get; }

/// <inheritdoc />
public void Dispose()
Expand Down
10 changes: 5 additions & 5 deletions projects/RabbitMQ.Client/client/api/PublicationAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ public PublicationAddress(string exchangeType, string exchangeName, string routi
/// <summary>
/// Retrieve the exchange name.
/// </summary>
public string ExchangeName { get; private set; }
public string ExchangeName { get; }

/// <summary>
/// Retrieve the exchange type string.
/// </summary>
public string ExchangeType { get; private set; }
public string ExchangeType { get; }

/// <summary>
///Retrieve the routing key.
/// </summary>
public string RoutingKey { get; private set; }
public string RoutingKey { get; }

/// <summary>
/// Parse a <see cref="PublicationAddress"/> out of the given string,
Expand All @@ -112,7 +112,7 @@ public static bool TryParse(string uriLikeString, out PublicationAddress result)
// Callers such as IBasicProperties.ReplyToAddress
// expect null result for invalid input.
// The regex.Match() throws on null arguments so we perform explicit check here
if (uriLikeString == null)
if (uriLikeString is null)
{
result = null;
return false;
Expand All @@ -121,7 +121,7 @@ public static bool TryParse(string uriLikeString, out PublicationAddress result)
{
try
{
var res = Parse(uriLikeString);
PublicationAddress res = Parse(uriLikeString);
result = res;
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions projects/RabbitMQ.Client/client/api/QueueDeclareOk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ public QueueDeclareOk(string queueName, uint messageCount, uint consumerCount)
/// <summary>
/// Consumer count.
/// </summary>
public uint ConsumerCount { get; private set; }
public uint ConsumerCount { get; }

/// <summary>
/// Message count.
/// </summary>
public uint MessageCount { get; private set; }
public uint MessageCount { get; }

/// <summary>
/// Queue name.
/// </summary>
public string QueueName { get; private set; }
public string QueueName { get; }

public static implicit operator string(QueueDeclareOk declareOk)
{
Expand Down
12 changes: 6 additions & 6 deletions projects/RabbitMQ.Client/client/api/ShutdownEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,32 +67,32 @@ public ShutdownEventArgs(ShutdownInitiator initiator, ushort replyCode, string r
/// <summary>
/// Object causing the shutdown, or null if none.
/// </summary>
public object Cause { get; private set; }
public object Cause { get; }

/// <summary>
/// AMQP content-class ID, or 0 if none.
/// </summary>
public ushort ClassId { get; private set; }
public ushort ClassId { get; }

/// <summary>
/// Returns the source of the shutdown event: either the application, the library, or the remote peer.
/// </summary>
public ShutdownInitiator Initiator { get; private set; }
public ShutdownInitiator Initiator { get; }

/// <summary>
/// AMQP method ID within a content-class, or 0 if none.
/// </summary>
public ushort MethodId { get; private set; }
public ushort MethodId { get; }

/// <summary>
/// One of the standardised AMQP reason codes. See RabbitMQ.Client.Framing.*.Constants.
/// </summary>
public ushort ReplyCode { get; private set; }
public ushort ReplyCode { get; }

/// <summary>
/// Informative human-readable reason text.
/// </summary>
public string ReplyText { get; private set; }
public string ReplyText { get; }

/// <summary>
/// Override ToString to be useful for debugging.
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/api/SslOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public X509CertificateCollection Certs
/// </summary>
internal SslProtocols UseFallbackTlsVersions()
{
this.Version = SslProtocols.Tls12;
Version = SslProtocols.Tls12;
return Version;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public BaseExceptionEventArgs(Exception exception)

///<summary>Access helpful information about the context in
///which the wrapped exception was thrown.</summary>
public IDictionary<string, object> Detail { get; private set; }
public IDictionary<string, object> Detail { get; }

///<summary>Access the wrapped exception.</summary>
public Exception Exception { get; private set; }
public Exception Exception { get; }

public IDictionary<string, object> UpdateDetails(IDictionary<string, object> other)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public ConnectionBlockedEventArgs(string reason)
/// <summary>
/// Access the reason why connection is blocked.
/// </summary>
public string Reason { get; private set; }
public string Reason { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public ConnectionRecoveryErrorEventArgs(Exception ex)
Exception = ex;
}

public Exception Exception { get; private set; }
public Exception Exception { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public ConsumerEventArgs(string[] consumerTags)

///<summary>Access the consumer-tags of the consumer the event
///relates to.</summary>
public string[] ConsumerTags { get; private set; }
public string[] ConsumerTags { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public ConsumerTagChangedAfterRecoveryEventArgs(string tagBefore, string tagAfte
/// <summary>
/// Gets the tag before.
/// </summary>
public string TagBefore { get; private set; }
public string TagBefore { get; }

/// <summary>
/// Gets the tag after.
/// </summary>
public string TagAfter { get; private set; }
public string TagAfter { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public FlowControlEventArgs(bool active)
/// <summary>
/// Access the flow control setting.
/// </summary>
public bool Active { get; private set; }
public bool Active { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public QueueNameChangedAfterRecoveryEventArgs(string nameBefore, string nameAfte
/// <summary>
/// Gets the name before.
/// </summary>
public string NameBefore { get; private set; }
public string NameBefore { get; }

/// <summary>
/// Gets the name after.
/// </summary>
public string NameAfter { get; private set; }
public string NameAfter { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ public ChannelAllocationException(int channel)
///return -1 in the case where "no more free channels" is
///being signaled, or a non-negative integer when "channel is
///in use" is being signaled.</summary>
public int Channel { get; private set; }
public int Channel { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ChannelErrorException(int channel)
}

///<summary>The channel number concerned.</summary>
public int Channel { get; private set; }
public int Channel { get; }

public override ushort ReplyCode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class OperationInterruptedException
///<summary>Construct an OperationInterruptedException with
///the passed-in explanation, if any.</summary>
public OperationInterruptedException(ShutdownEventArgs reason)
: base(reason == null ? "The AMQP operation was interrupted" :
: base(reason is null ? "The AMQP operation was interrupted" :
$"The AMQP operation was interrupted: {reason}")
{
ShutdownReason = reason;
Expand All @@ -59,7 +59,7 @@ public OperationInterruptedException(ShutdownEventArgs reason)
///<summary>Construct an OperationInterruptedException with
///the passed-in explanation and prefix, if any.</summary>
public OperationInterruptedException(ShutdownEventArgs reason, string prefix)
: base(reason == null ? $"{prefix}: The AMQP operation was interrupted" :
: base(reason is null ? $"{prefix}: The AMQP operation was interrupted" :
$"{prefix}: The AMQP operation was interrupted: {reason}")
{
ShutdownReason = reason;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ public PacketNotRecognizedException(int transportHigh,
}

///<summary>The peer's AMQP specification major version.</summary>
public int ServerMajor { get; private set; }
public int ServerMajor { get; }

///<summary>The peer's AMQP specification minor version.</summary>
public int ServerMinor { get; private set; }
public int ServerMinor { get; }

///<summary>The peer's high transport byte.</summary>
public int TransportHigh { get; private set; }
public int TransportHigh { get; }

///<summary>The peer's low transport byte.</summary>
public int TransportLow { get; private set; }
public int TransportLow { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ public ProtocolVersionMismatchException(int clientMajor,
}

///<summary>The client's AMQP specification major version.</summary>
public int ClientMajor { get; private set; }
public int ClientMajor { get; }

///<summary>The client's AMQP specification minor version.</summary>
public int ClientMinor { get; private set; }
public int ClientMinor { get; }

///<summary>The peer's AMQP specification major version.</summary>
public int ServerMajor { get; private set; }
public int ServerMajor { get; }

///<summary>The peer's AMQP specification minor version.</summary>
public int ServerMinor { get; private set; }
public int ServerMinor { get; }

private static string positiveOrUnknown(int version)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ protected SoftProtocolException(int channelNumber, string message)
Channel = channelNumber;
}

public int Channel { get; private set; }
public int Channel { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public UnknownClassOrMethodException(ushort classId, ushort methodId)
}

///<summary>The AMQP content-class ID.</summary>
public ushort ClassId { get; private set; }
public ushort ClassId { get; }

///<summary>The AMQP method ID within the content-class, or 0 if none.</summary>
public ushort MethodId { get; private set; }
public ushort MethodId { get; }

public override ushort ReplyCode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ public UnsupportedMethodException(string methodName)
}

///<summary>The name of the RPC request that could not be sent.</summary>
public string MethodName { get; private set; }
public string MethodName { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public UnsupportedMethodFieldException(string methodName, string fieldName)
}

///<summary>The name of the unsupported field.</summary>
public string FieldName { get; private set; }
public string FieldName { get; }

///<summary>The name of the method involved.</summary>
public string MethodName { get; private set; }
public string MethodName { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ public WireFormattingException(string message, object offender)

///<summary>Object which this exception is complaining about;
///may be null if no particular offender exists</summary>
public object Offender { get; private set; }
public object Offender { get; }
}
}
Loading