Skip to content

Commit 70a1f22

Browse files
committed
First round of code cleanups.
1 parent 793c8d5 commit 70a1f22

Some content is hidden

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

42 files changed

+381
-1297
lines changed

_site

Submodule _site updated 161 files

projects/RabbitMQ.Client/client/api/AmqpTimestamp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public AmqpTimestamp(long unixTime) : this()
6565
/// <summary>
6666
/// Unix time.
6767
/// </summary>
68-
public long UnixTime { get; private set; }
68+
public long UnixTime { get; }
6969

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

projects/RabbitMQ.Client/client/api/BasicGetResult.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,22 @@ public BasicGetResult(ulong deliveryTag, bool redelivered, string exchange, stri
9191
/// <summary>
9292
/// Retrieves the Basic-class content header properties for this message.
9393
/// </summary>
94-
public IBasicProperties BasicProperties { get; private set; }
94+
public IBasicProperties BasicProperties { get; }
9595

9696
/// <summary>
9797
/// Retrieves the body of this message.
9898
/// </summary>
99-
public ReadOnlyMemory<byte> Body { get; private set; }
99+
public ReadOnlyMemory<byte> Body { get; }
100100

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

106106
/// <summary>
107107
/// Retrieve the exchange this message was published to.
108108
/// </summary>
109-
public string Exchange { get; private set; }
109+
public string Exchange { get; }
110110

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

120120
/// <summary>
121121
/// Retrieve the redelivered flag for this message.
122122
/// </summary>
123-
public bool Redelivered { get; private set; }
123+
public bool Redelivered { get; }
124124

125125
/// <summary>
126126
/// Retrieve the routing key with which this message was published.
127127
/// </summary>
128-
public string RoutingKey { get; private set; }
128+
public string RoutingKey { get; }
129129

130130
/// <inheritdoc />
131131
public void Dispose()

projects/RabbitMQ.Client/client/api/PublicationAddress.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ public PublicationAddress(string exchangeType, string exchangeName, string routi
7979
/// <summary>
8080
/// Retrieve the exchange name.
8181
/// </summary>
82-
public string ExchangeName { get; private set; }
82+
public string ExchangeName { get; }
8383

8484
/// <summary>
8585
/// Retrieve the exchange type string.
8686
/// </summary>
87-
public string ExchangeType { get; private set; }
87+
public string ExchangeType { get; }
8888

8989
/// <summary>
9090
///Retrieve the routing key.
9191
/// </summary>
92-
public string RoutingKey { get; private set; }
92+
public string RoutingKey { get; }
9393

9494
/// <summary>
9595
/// Parse a <see cref="PublicationAddress"/> out of the given string,

projects/RabbitMQ.Client/client/api/QueueDeclareOk.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ public QueueDeclareOk(string queueName, uint messageCount, uint consumerCount)
5252
/// <summary>
5353
/// Consumer count.
5454
/// </summary>
55-
public uint ConsumerCount { get; private set; }
55+
public uint ConsumerCount { get; }
5656

5757
/// <summary>
5858
/// Message count.
5959
/// </summary>
60-
public uint MessageCount { get; private set; }
60+
public uint MessageCount { get; }
6161

6262
/// <summary>
6363
/// Queue name.
6464
/// </summary>
65-
public string QueueName { get; private set; }
65+
public string QueueName { get; }
6666

6767
public static implicit operator string(QueueDeclareOk declareOk)
6868
{

projects/RabbitMQ.Client/client/api/ShutdownEventArgs.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,32 +67,32 @@ public ShutdownEventArgs(ShutdownInitiator initiator, ushort replyCode, string r
6767
/// <summary>
6868
/// Object causing the shutdown, or null if none.
6969
/// </summary>
70-
public object Cause { get; private set; }
70+
public object Cause { get; }
7171

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

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

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

8787
/// <summary>
8888
/// One of the standardised AMQP reason codes. See RabbitMQ.Client.Framing.*.Constants.
8989
/// </summary>
90-
public ushort ReplyCode { get; private set; }
90+
public ushort ReplyCode { get; }
9191

9292
/// <summary>
9393
/// Informative human-readable reason text.
9494
/// </summary>
95-
public string ReplyText { get; private set; }
95+
public string ReplyText { get; }
9696

9797
/// <summary>
9898
/// Override ToString to be useful for debugging.

projects/RabbitMQ.Client/client/api/SslOption.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public X509CertificateCollection Certs
163163
/// </summary>
164164
internal SslProtocols UseFallbackTlsVersions()
165165
{
166-
this.Version = SslProtocols.Tls12;
166+
Version = SslProtocols.Tls12;
167167
return Version;
168168
}
169169
}

projects/RabbitMQ.Client/client/events/CallbackExceptionEventArgs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public BaseExceptionEventArgs(Exception exception)
4545

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

5050
///<summary>Access the wrapped exception.</summary>
51-
public Exception Exception { get; private set; }
51+
public Exception Exception { get; }
5252

5353
public IDictionary<string, object> UpdateDetails(IDictionary<string, object> other)
5454
{

projects/RabbitMQ.Client/client/events/ConnectionBlockedEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ public ConnectionBlockedEventArgs(string reason)
4646
/// <summary>
4747
/// Access the reason why connection is blocked.
4848
/// </summary>
49-
public string Reason { get; private set; }
49+
public string Reason { get; }
5050
}
5151
}

projects/RabbitMQ.Client/client/events/ConnectionRecoveryErrorEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ public ConnectionRecoveryErrorEventArgs(Exception ex)
4040
Exception = ex;
4141
}
4242

43-
public Exception Exception { get; private set; }
43+
public Exception Exception { get; }
4444
}
4545
}

0 commit comments

Comments
 (0)