public ApplePushNotification(JSONClass json)
 {
     Alert = new ApplePushNotificationAlert(json["alert"].AsObject);
       Badge = json["badge"].AsInt;
       Sound = json["sound"];
       ContentAvailable = json["content-available"].AsInt;
       Extra = new Dictionary<string, object>();
       JSONNode ExtraNode = json["extra"];
       if (ExtraNode.GetType() == typeof(JSONClass)) {
     foreach (KeyValuePair<string, JSONNode> KeyValuePairNode in ExtraNode.AsObject) {
       Extra.Add(KeyValuePairNode.Key, this.getJSONNodeValue(KeyValuePairNode.Value));
     }
       } else {
     Debug.Log("Value of key Extra isn't a dictionary. Stop parsing the Extra dictionary");
       }
 }
示例#2
0
        public ApplePushNotification(JSONClass json)
        {
            Alert            = new ApplePushNotificationAlert(json["alert"].AsObject);
            Badge            = json["badge"].AsInt;
            Sound            = json["sound"];
            ContentAvailable = json["content-available"].AsInt;
            Extra            = new Dictionary <string, object>();
            JSONNode ExtraNode = json["extra"];

            if (ExtraNode.GetType() == typeof(JSONClass))
            {
                foreach (KeyValuePair <string, JSONNode> KeyValuePairNode in ExtraNode.AsObject)
                {
                    Extra.Add(KeyValuePairNode.Key, this.getJSONNodeValue(KeyValuePairNode.Value));
                }
            }
            else
            {
                Debug.Log("Value of key Extra isn't a dictionary. Stop parsing the Extra dictionary");
            }
        }