Skip to content

Commit 6a2604e

Browse files
committed
Make ReadonlyBasicProperties a class.
Follow-up to #1601 #1601 (comment) cc @bollhals
1 parent 299ccda commit 6a2604e

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 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
@@ -259,7 +259,7 @@ protected override Task InternalShutdownAsync()
259259
public readonly bool Redelivered;
260260
public readonly string? Exchange;
261261
public readonly string? RoutingKey;
262-
public readonly ReadOnlyBasicProperties BasicProperties;
262+
public readonly ReadOnlyBasicProperties? BasicProperties;
263263
public readonly RentedMemory Body;
264264
public readonly ShutdownEventArgs? Reason;
265265
public readonly WorkType WorkType;

0 commit comments

Comments
 (0)