|
31 | 31 |
|
32 | 32 | using System;
|
33 | 33 | using System.Collections.Generic;
|
| 34 | +using System.Diagnostics.CodeAnalysis; |
34 | 35 | using RabbitMQ.Client.Framing.Impl;
|
35 | 36 | using RabbitMQ.Client.Impl;
|
36 | 37 |
|
37 | 38 | namespace RabbitMQ.Client
|
38 | 39 | {
|
39 |
| -#nullable enable |
40 | 40 | /// <summary>
|
41 | 41 | /// AMQP specification content header properties for content class "basic".
|
42 | 42 | /// </summary>
|
@@ -74,7 +74,7 @@ public PublicationAddress? ReplyToAddress
|
74 | 74 | {
|
75 | 75 | get
|
76 | 76 | {
|
77 |
| - PublicationAddress.TryParse(ReplyTo, out PublicationAddress result); |
| 77 | + PublicationAddress.TryParse(ReplyTo, out PublicationAddress? result); |
78 | 78 | return result;
|
79 | 79 | }
|
80 | 80 |
|
@@ -118,19 +118,30 @@ public BasicProperties(IReadOnlyBasicProperties input)
|
118 | 118 | public void ClearAppId() => AppId = default;
|
119 | 119 | public void ClearClusterId() => ClusterId = default;
|
120 | 120 |
|
| 121 | + [MemberNotNullWhen(true, nameof(ContentType))] |
121 | 122 | public bool IsContentTypePresent() => ContentType != default;
|
| 123 | + [MemberNotNullWhen(true, nameof(ContentEncoding))] |
122 | 124 | public bool IsContentEncodingPresent() => ContentEncoding != default;
|
| 125 | + [MemberNotNullWhen(true, nameof(Headers))] |
123 | 126 | public bool IsHeadersPresent() => Headers != default;
|
124 | 127 | public bool IsDeliveryModePresent() => DeliveryMode != default;
|
125 | 128 | public bool IsPriorityPresent() => Priority != default;
|
| 129 | + [MemberNotNullWhen(true, nameof(CorrelationId))] |
126 | 130 | public bool IsCorrelationIdPresent() => CorrelationId != default;
|
| 131 | + [MemberNotNullWhen(true, nameof(ReplyTo))] |
127 | 132 | public bool IsReplyToPresent() => ReplyTo != default;
|
| 133 | + [MemberNotNullWhen(true, nameof(Expiration))] |
128 | 134 | public bool IsExpirationPresent() => Expiration != default;
|
| 135 | + [MemberNotNullWhen(true, nameof(MessageId))] |
129 | 136 | public bool IsMessageIdPresent() => MessageId != default;
|
130 | 137 | public bool IsTimestampPresent() => Timestamp != default;
|
| 138 | + [MemberNotNullWhen(true, nameof(Type))] |
131 | 139 | public bool IsTypePresent() => Type != default;
|
| 140 | + [MemberNotNullWhen(true, nameof(UserId))] |
132 | 141 | public bool IsUserIdPresent() => UserId != default;
|
| 142 | + [MemberNotNullWhen(true, nameof(AppId))] |
133 | 143 | public bool IsAppIdPresent() => AppId != default;
|
| 144 | + [MemberNotNullWhen(true, nameof(ClusterId))] |
134 | 145 | public bool IsClusterIdPresent() => ClusterId != default;
|
135 | 146 |
|
136 | 147 | ushort IAmqpHeader.ProtocolClassId => ClassConstants.Basic;
|
|
0 commit comments