mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 19:13:11 +08:00
Expose server session items (#1638)
* Expose server session items * Add support for custom session items for injected application messages
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace MQTTnet.Server
|
||||
{
|
||||
@@ -13,8 +14,15 @@ namespace MQTTnet.Server
|
||||
ApplicationMessage = applicationMessage ?? throw new ArgumentNullException(nameof(applicationMessage));
|
||||
}
|
||||
|
||||
public string SenderClientId { get; set; } = string.Empty;
|
||||
public MqttApplicationMessage ApplicationMessage { get; }
|
||||
|
||||
public MqttApplicationMessage ApplicationMessage { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the session items which should be used for all event handlers which are involved in message
|
||||
/// processing.
|
||||
/// If _null_ is specified the singleton session items from the server are used instead.
|
||||
/// </summary>
|
||||
public IDictionary CustomSessionItems { get; set; }
|
||||
|
||||
public string SenderClientId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user