您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

19 行
556 B

  1. using System;
  2. namespace MQTTnet.Diagnostics
  3. {
  4. public static class MqttNetGlobalLogger
  5. {
  6. public static event EventHandler<MqttNetLogMessagePublishedEventArgs> LogMessagePublished;
  7. public static bool HasListeners => LogMessagePublished != null;
  8. public static void Publish(MqttNetLogMessage logMessage)
  9. {
  10. if (logMessage == null) throw new ArgumentNullException(nameof(logMessage));
  11. LogMessagePublished?.Invoke(null, new MqttNetLogMessagePublishedEventArgs(logMessage));
  12. }
  13. }
  14. }