Rename "QualityOfServiceLevel" to SubscriptionQualityOfServiceLevel where appropriated to make the difference between the two different QoS fields more clear

This commit is contained in:
Marc Sallin
2020-09-04 09:53:34 +02:00
committed by Sallin Marc, I212
parent cf217034fa
commit b0c603082b
3 changed files with 12 additions and 4 deletions
@@ -392,7 +392,7 @@ namespace MQTTnet.Server
}
publishPacket = _dataConverter.CreatePublishPacket(queuedApplicationMessage.ApplicationMessage);
publishPacket.QualityOfServiceLevel = queuedApplicationMessage.QualityOfServiceLevel;
publishPacket.QualityOfServiceLevel = queuedApplicationMessage.SubscriptionQualityOfServiceLevel;
// Set the retain flag to true according to [MQTT-3.3.1-8] and [MQTT-3.3.1-9].
publishPacket.Retain = queuedApplicationMessage.IsRetainedMessage;
@@ -27,7 +27,7 @@ namespace MQTTnet.Server
{
ApplicationMessage = applicationMessage,
SenderClientId = senderClientId,
QualityOfServiceLevel = qualityOfServiceLevel,
SubscriptionQualityOfServiceLevel = qualityOfServiceLevel,
IsRetainedMessage = isRetainedMessage
});
}
@@ -1,4 +1,5 @@
using MQTTnet.Protocol;
using System;
using MQTTnet.Protocol;
namespace MQTTnet.Server
{
@@ -10,7 +11,14 @@ namespace MQTTnet.Server
public bool IsRetainedMessage { get; set; }
public MqttQualityOfServiceLevel QualityOfServiceLevel { get; set; }
public MqttQualityOfServiceLevel SubscriptionQualityOfServiceLevel { get; set; }
[Obsolete("Use 'SubscriptionQualityOfServiceLevel' instead.")]
public MqttQualityOfServiceLevel QualityOfServiceLevel
{
get => SubscriptionQualityOfServiceLevel;
set => SubscriptionQualityOfServiceLevel = value;
}
public bool IsDuplicate { get; set; }
}