Skip to content

Make ReadonlyBasicProperties a class. #1607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 21, 2024
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
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 sealed 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