Пример #1
0
 public Message(PublishArrivedArgs e)
 {
     datetime = DateTime.Now;
     topic    = e.Topic;
     payload  = e.Payload.ToString();
     name     = StaticResources.QosToName(e.QualityOfService);
     retained = e.Retained ? "是" : "否";
 }
Пример #2
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("任务名:" + TaskName + "\r\n");
            stringBuilder.Append("运行状态:" + (state ? "运行中" : "停止") + "\r\n");
            stringBuilder.Append("推送主题:" + topic + "\r\n");
            stringBuilder.Append("服务质量:" + StaticResources.QosToName(qoS));
            stringBuilder.Append("是否保留:" + (retained ? "是" : "否") + "\r\n");
            return(stringBuilder.ToString());
        }