Refactor code.

This commit is contained in:
Christian
2021-10-24 21:19:40 +02:00
parent 5af54963a0
commit 43e4038212
39 changed files with 500 additions and 463 deletions
+3 -3
View File
@@ -51,7 +51,7 @@ namespace MQTTnet
/// The feature is very similar to the HTTP header concept.
/// Hint: MQTT 5 feature only.
/// </summary>
public List<MqttUserProperty> UserProperties { get; set; }
public List<MqttUserProperty> UserProperties { get; set; } = new List<MqttUserProperty>();
/// <summary>
/// Gets or sets the content type.
@@ -74,7 +74,7 @@ namespace MQTTnet
/// If no payload format indicator is provided, the default value is 0.
/// Hint: MQTT 5 feature only.
/// </summary>
public MqttPayloadFormatIndicator? PayloadFormatIndicator { get; set; }
public MqttPayloadFormatIndicator PayloadFormatIndicator { get; set; } = MqttPayloadFormatIndicator.Unspecified;
/// <summary>
/// Gets or sets the message expiry interval.
@@ -84,7 +84,7 @@ namespace MQTTnet
/// When the retained=true option is set on the PUBLISH message, this interval also defines how long a message is retained on a topic.
/// Hint: MQTT 5 feature only.
/// </summary>
public uint? MessageExpiryInterval { get; set; }
public uint MessageExpiryInterval { get; set; }
/// <summary>
/// Gets or sets the topic alias.