Skip to content

Commit

Permalink
Make ReadonlyBasicProperties a class.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Jun 20, 2024
1 parent 299ccda commit 6a2604e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ConsumerDispatcherBase
protected readonly ulong _deliveryTag = 500UL;
protected readonly string _exchange = "Exchange";
protected readonly string _routingKey = "RoutingKey";
protected readonly ReadOnlyBasicProperties _properties = new ReadOnlyBasicProperties();
protected readonly ReadOnlyBasicProperties _properties = null;
protected readonly byte[] _body = new byte[512];

public ConsumerDispatcherBase()
Expand Down
1 change: 0 additions & 1 deletion projects/RabbitMQ.Client/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ RabbitMQ.Client.ReadOnlyBasicProperties.IsUserIdPresent() -> bool
RabbitMQ.Client.ReadOnlyBasicProperties.MessageId.get -> string
RabbitMQ.Client.ReadOnlyBasicProperties.Persistent.get -> bool
RabbitMQ.Client.ReadOnlyBasicProperties.Priority.get -> byte
RabbitMQ.Client.ReadOnlyBasicProperties.ReadOnlyBasicProperties() -> void
RabbitMQ.Client.ReadOnlyBasicProperties.ReadOnlyBasicProperties(System.ReadOnlySpan<byte> span) -> void
RabbitMQ.Client.ReadOnlyBasicProperties.ReplyTo.get -> string
RabbitMQ.Client.ReadOnlyBasicProperties.ReplyToAddress.get -> RabbitMQ.Client.PublicationAddress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace RabbitMQ.Client
/// <summary>
/// AMQP specification content header properties for content class "basic"
/// </summary>
public readonly struct ReadOnlyBasicProperties : IReadOnlyBasicProperties
public class ReadOnlyBasicProperties : IReadOnlyBasicProperties
{
private readonly string? _contentType;
private readonly string? _contentEncoding;
Expand Down Expand Up @@ -83,7 +83,6 @@ public PublicationAddress? ReplyToAddress
}

public ReadOnlyBasicProperties(ReadOnlySpan<byte> span)
: this()
{
int offset = 2;
ref readonly byte bits = ref span[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ protected override Task InternalShutdownAsync()
public readonly bool Redelivered;
public readonly string? Exchange;
public readonly string? RoutingKey;
public readonly ReadOnlyBasicProperties BasicProperties;
public readonly ReadOnlyBasicProperties? BasicProperties;
public readonly RentedMemory Body;
public readonly ShutdownEventArgs? Reason;
public readonly WorkType WorkType;
Expand Down

0 comments on commit 6a2604e

Please sign in to comment.