mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 18:43:10 +08:00
Refactor namespaces.
This commit is contained in:
@@ -4,38 +4,39 @@ namespace MQTTnet
|
||||
{
|
||||
public class TopicFilter
|
||||
{
|
||||
public TopicFilter(string topic, MqttQualityOfServiceLevel qualityOfServiceLevel)
|
||||
{
|
||||
Topic = topic;
|
||||
QualityOfServiceLevel = qualityOfServiceLevel;
|
||||
}
|
||||
|
||||
public string Topic { get; set; }
|
||||
|
||||
public MqttQualityOfServiceLevel QualityOfServiceLevel { get; set; }
|
||||
|
||||
#region Added in MQTTv5
|
||||
|
||||
/// <summary>
|
||||
/// This is only available when using MQTT version 5.
|
||||
/// This is only supported when using MQTTv5.
|
||||
/// </summary>
|
||||
public bool? NoLocal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is only available when using MQTT version 5.
|
||||
/// This is only supported when using MQTTv5.
|
||||
/// </summary>
|
||||
public bool? RetainAsPublished { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is only available when using MQTT version 5.
|
||||
/// This is only supported when using MQTTv5.
|
||||
/// </summary>
|
||||
public MqttRetainHandling? RetainHandling { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Topic + "@" + QualityOfServiceLevel;
|
||||
return string.Concat(
|
||||
"TopicFilter: [Topic=",
|
||||
Topic,
|
||||
"] [QualityOfServiceLevel=",
|
||||
QualityOfServiceLevel,
|
||||
"] [NoLocal=",
|
||||
NoLocal,
|
||||
"] [RetainAsPublished=",
|
||||
RetainAsPublished,
|
||||
"] [RetainHandling=",
|
||||
RetainHandling,
|
||||
"]");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user