Skip to content

Commit 7781e4e

Browse files
authored
Merge pull request #1607 from rabbitmq/rabbitmq-dotnet-client-1601-followup
Make `ReadonlyBasicProperties` a class.
2 parents bd53007 + d5e0bc1 commit 7781e4e

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

projects/Benchmarks/ConsumerDispatching/ConsumerDispatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class ConsumerDispatcherBase
1919
protected readonly ulong _deliveryTag = 500UL;
2020
protected readonly string _exchange = "Exchange";
2121
protected readonly string _routingKey = "RoutingKey";
22-
protected readonly ReadOnlyBasicProperties _properties = new ReadOnlyBasicProperties();
22+
protected readonly ReadOnlyBasicProperties _properties = null;
2323
protected readonly byte[] _body = new byte[512];
2424

2525
public ConsumerDispatcherBase()

projects/RabbitMQ.Client/PublicAPI.Shipped.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,6 @@ RabbitMQ.Client.ReadOnlyBasicProperties.IsUserIdPresent() -> bool
681681
RabbitMQ.Client.ReadOnlyBasicProperties.MessageId.get -> string
682682
RabbitMQ.Client.ReadOnlyBasicProperties.Persistent.get -> bool
683683
RabbitMQ.Client.ReadOnlyBasicProperties.Priority.get -> byte
684-
RabbitMQ.Client.ReadOnlyBasicProperties.ReadOnlyBasicProperties() -> void
685684
RabbitMQ.Client.ReadOnlyBasicProperties.ReadOnlyBasicProperties(System.ReadOnlySpan<byte> span) -> void
686685
RabbitMQ.Client.ReadOnlyBasicProperties.ReplyTo.get -> string
687686
RabbitMQ.Client.ReadOnlyBasicProperties.ReplyToAddress.get -> RabbitMQ.Client.PublicationAddress

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace RabbitMQ.Client
3939
/// <summary>
4040
/// AMQP specification content header properties for content class "basic"
4141
/// </summary>
42-
public readonly struct ReadOnlyBasicProperties : IReadOnlyBasicProperties
42+
public sealed class ReadOnlyBasicProperties : IReadOnlyBasicProperties
4343
{
4444
private readonly string? _contentType;
4545
private readonly string? _contentEncoding;
@@ -83,7 +83,6 @@ public PublicationAddress? ReplyToAddress
8383
}
8484

8585
public ReadOnlyBasicProperties(ReadOnlySpan<byte> span)
86-
: this()
8786
{
8887
int offset = 2;
8988
ref readonly byte bits = ref span[0];

projects/RabbitMQ.Client/client/impl/ConsumerDispatching/ConsumerDispatcherChannelBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ protected override Task InternalShutdownAsync()
234234
public readonly bool Redelivered;
235235
public readonly string? Exchange;
236236
public readonly string? RoutingKey;
237-
public readonly ReadOnlyBasicProperties BasicProperties;
237+
public readonly ReadOnlyBasicProperties? BasicProperties;
238238
public readonly RentedMemory Body;
239239
public readonly ShutdownEventArgs? Reason;
240240
public readonly WorkType WorkType;

0 commit comments

Comments
 (0)