MqttUnsubscriptionInterceptorContext.cs 802 B

123456789101112131415161718192021222324252627
  1. using System.Collections.Generic;
  2. namespace MQTTnet.Server
  3. {
  4. public class MqttUnsubscriptionInterceptorContext
  5. {
  6. public MqttUnsubscriptionInterceptorContext(string clientId, string topic, IDictionary<object, object> sessionItems)
  7. {
  8. ClientId = clientId;
  9. Topic = topic;
  10. SessionItems = sessionItems;
  11. }
  12. public string ClientId { get; }
  13. public string Topic { get; set; }
  14. /// <summary>
  15. /// Gets or sets a key/value collection that can be used to share data within the scope of this session.
  16. /// </summary>
  17. public IDictionary<object, object> SessionItems { get; }
  18. public bool AcceptUnsubscription { get; set; } = true;
  19. public bool CloseConnection { get; set; }
  20. }
  21. }