/// <summary>状态修改事件</summary> /// <param name="entityType">实体类型Id</param> /// <param name="type">状态类型</param> /// <param name="data">对应实体</param> void IEntityEventProxy.OnStatusChanged(int entityType, EntitySubsist type, NotificationObject data) { var msg = $@" {StationProgram.Config.StationName} {data.GetType().FullName} {type} {(data == null ? "{}" : JsonConvert.SerializeObject(data))}"; Task.Factory.StartNew(Request, msg); }
public override JObject Payload( ) { Dictionary <string, object> aps = new Dictionary <string, object>( ); Dictionary <string, object> apsDetails = new Dictionary <string, object>( ); apsDetails.Add("content-available", 1); aps.Add("aps", apsDetails); aps.Add("acmkind", NotificationObject.GetType().Name); aps.Add("acmcloudid", NotificationObject.CloudIdentifier()); aps.Add("acmtype", NotificationType); //return JObject.Parse(JsonConvert.SerializeObject(aps)); return(JObject.FromObject(aps)); }