@@ -79,91 +79,88 @@ public void ClearUserId()
79
79
throw new NotImplementedException ( ) ;
80
80
}
81
81
82
- public bool IsAppIdPresent ( )
83
- {
84
- throw new NotImplementedException ( ) ;
85
- }
82
+ public bool IsAppIdPresent ( ) => appIdPresent ;
83
+ public bool IsClusterIdPresent ( ) => clusterIdPresent ;
84
+ public bool IsContentEncodingPresent ( ) => contentEncodingPresent ;
85
+ public bool IsContentTypePresent ( ) => contentTypePresent ;
86
+ public bool IsCorrelationIdPresent ( ) => correlationIdPresent ;
87
+ public bool IsDeliveryModePresent ( ) => deliveryModePresent ;
88
+ public bool IsExpirationPresent ( ) => expirationPresent ;
89
+ public bool IsHeadersPresent ( ) => headersPresent ;
90
+ public bool IsMessageIdPresent ( ) => messageIdPresent ;
91
+ public bool IsPriorityPresent ( ) => priorityPresent ;
92
+ public bool IsReplyToPresent ( ) => replyToPresent ;
93
+ public bool IsTimestampPresent ( ) => timestampPresent ;
94
+ public bool IsTypePresent ( ) => typePresent ;
95
+ public bool IsUserIdPresent ( ) => userIdPresent ;
96
+
86
97
87
- public bool IsClusterIdPresent ( )
88
- {
89
- throw new NotImplementedException ( ) ;
90
- }
98
+ private bool appIdPresent ;
99
+ private string appId ;
91
100
92
- public bool IsContentEncodingPresent ( )
93
- {
94
- throw new NotImplementedException ( ) ;
95
- }
101
+ private bool clusterIdPresent ;
102
+ private string clusterId ;
96
103
97
- public bool IsContentTypePresent ( )
98
- {
99
- throw new NotImplementedException ( ) ;
100
- }
104
+ private bool contentEncodingPresent ;
105
+ private string contentEncoding ;
101
106
102
- public bool IsCorrelationIdPresent ( )
103
- {
104
- throw new NotImplementedException ( ) ;
105
- }
107
+ private bool contentTypePresent ;
108
+ private string contentType ;
106
109
107
- public bool IsDeliveryModePresent ( )
108
- {
109
- throw new NotImplementedException ( ) ;
110
- }
110
+ private bool correlationIdPresent ;
111
+ private string correlationId ;
111
112
112
- public bool IsExpirationPresent ( )
113
- {
114
- throw new NotImplementedException ( ) ;
115
- }
113
+ private bool deliveryModePresent ;
114
+ private byte deliveryMode ;
116
115
117
- public bool IsHeadersPresent ( )
118
- {
119
- throw new NotImplementedException ( ) ;
120
- }
116
+ private bool expirationPresent ;
117
+ private string expiration ;
121
118
122
- public bool IsMessageIdPresent ( )
123
- {
124
- throw new NotImplementedException ( ) ;
125
- }
119
+ private bool headersPresent ;
120
+ private IDictionary < string , object > headers ;
121
+
122
+ private bool messageIdPresent ;
123
+ private string messageId ;
126
124
127
- public bool IsPriorityPresent ( )
128
- {
129
- throw new NotImplementedException ( ) ;
130
- }
125
+ private bool priorityPresent ;
126
+ private byte priority ;
131
127
132
- public bool IsReplyToPresent ( )
133
- {
134
- throw new NotImplementedException ( ) ;
135
- }
128
+ private bool replyToPresent ;
129
+ private string replyTo ;
136
130
137
- public bool IsTimestampPresent ( )
138
- {
139
- throw new NotImplementedException ( ) ;
140
- }
131
+ private bool timestampPresent ;
132
+ private AmqpTimestamp timestamp ;
141
133
142
- public bool IsTypePresent ( )
143
- {
144
- throw new NotImplementedException ( ) ;
145
- }
134
+ private bool typePresent ;
135
+ private string type ;
146
136
147
- public bool IsUserIdPresent ( )
148
- {
149
- throw new NotImplementedException ( ) ;
150
- }
137
+ private bool userIdPresent ;
138
+ private string userId ;
151
139
152
- public string AppId { get ; set ; }
153
- public string ClusterId { get ; set ; }
154
- public string ContentEncoding { get ; set ; }
155
- public string ContentType { get ; set ; }
156
- public string CorrelationId { get ; set ; }
157
- public byte DeliveryMode { get ; set ; }
158
- public string Expiration { get ; set ; }
159
- public IDictionary < string , object > Headers { get ; set ; }
160
- public string MessageId { get ; set ; }
140
+
141
+
142
+ public string AppId { get => appId ; set => SetValue ( out appId , out appIdPresent , value ) ; }
143
+ public string ClusterId { get => clusterId ; set => SetValue ( out clusterId , out clusterIdPresent , value ) ; }
144
+ public string ContentEncoding { get => contentEncoding ; set => SetValue ( out contentEncoding , out contentEncodingPresent , value ) ; }
145
+ public string ContentType { get => contentType ; set => SetValue ( out contentType , out contentTypePresent , value ) ; }
146
+ public string CorrelationId { get => correlationId ; set => SetValue ( out correlationId , out correlationIdPresent , value ) ; }
147
+ public byte DeliveryMode { get => deliveryMode ; set => SetValue ( out deliveryMode , out deliveryModePresent , value ) ; }
148
+ public string Expiration { get => expiration ; set => SetValue ( out expiration , out expirationPresent , value ) ; }
149
+ public IDictionary < string , object > Headers { get => headers ; set => SetValue ( out headers , out headersPresent , value ) ; }
150
+ public string MessageId { get => messageId ; set => SetValue ( out messageId , out messageIdPresent , value ) ; }
161
151
public bool Persistent { get ; set ; }
162
- public byte Priority { get ; set ; }
163
- public string ReplyTo { get ; set ; }
152
+ public byte Priority { get => priority ; set => SetValue ( out priority , out priorityPresent , value ) ; }
153
+ public string ReplyTo { get => replyTo ; set => SetValue ( out replyTo , out replyToPresent , value ) ; }
164
154
public PublicationAddress ReplyToAddress { get ; set ; }
165
- public AmqpTimestamp Timestamp { get ; set ; }
166
- public string Type { get ; set ; }
167
- public string UserId { get ; set ; }
155
+ public AmqpTimestamp Timestamp { get => timestamp ; set => SetValue ( out timestamp , out timestampPresent , value ) ; }
156
+ public string Type { get => type ; set => SetValue ( out type , out typePresent , value ) ; }
157
+ public string UserId { get => userId ; set => SetValue ( out userId , out userIdPresent , value ) ; }
158
+
159
+
160
+ private static void SetValue < T > ( out T field , out bool present , T value )
161
+ {
162
+ field = value ;
163
+ present = true ;
164
+ }
168
165
}
169
166
}
0 commit comments