Пример #1
0
        private AsObject BuildError(string destination, string operation, object[] args, object response)
        {
            AsObject obj = new AsObject();

            obj.Add("Destination", destination);
            obj.Add("Operation", operation);
            obj.Add("Arguments", args);
            obj.Add("Return", response);
            return(obj);
        }
Пример #2
0
        private AsObject BuildError(string destination, string operation, object[] args, object response)
        {
            AsObject obj = new AsObject();

            obj.Add("Destination", destination);
            obj.Add("Operation", operation);
            obj.Add("Arguments", args);
            obj.Add("Return", response);
            return obj;
        }
Пример #3
0
        private AsObject BuildAsync(object body)
        {
            AsObject obj = new AsObject();

            obj.Add("Body", body);
            return(obj);
        }
Пример #4
0
        public static PromoteItem LeaguesPromote(string json)
        {
            var newItem = new PromoteItem();
            var serializer = new JavaScriptSerializer();
            var deserializedJson = serializer.Deserialize<Dictionary<string, object>>(json);
            var leagueItem = deserializedJson["leagueItem"] as Dictionary<string, object>;
            if (leagueItem == null)
                return newItem;

            var asd = new AsObject();
            newItem.notifyReason = deserializedJson["notifyReason"] as string;
            newItem.LeaguePointsDelta = deserializedJson["leaguePointsDelta"] as int?;
            newItem.LeaguePointsDelta = deserializedJson["gameId"] as int?;
            foreach (var item in leagueItem)
            {
                asd.Add(item.Key,item.Value);
            }
            newItem.leagueItem = (LeagueItemDTO)(object)asd;
            return newItem;
        }
Пример #5
0
        public static PromoteItem LeaguesPromote(string json)
        {
            var newItem          = new PromoteItem();
            var serializer       = new JavaScriptSerializer();
            var deserializedJson = serializer.Deserialize <Dictionary <string, object> >(json);
            var leagueItem       = deserializedJson["leagueItem"] as Dictionary <string, object>;

            if (leagueItem == null)
            {
                return(newItem);
            }

            var asd = new AsObject();

            newItem.notifyReason      = deserializedJson["notifyReason"] as string;
            newItem.LeaguePointsDelta = deserializedJson["leaguePointsDelta"] as int?;
            newItem.LeaguePointsDelta = deserializedJson["gameId"] as int?;
            foreach (var item in leagueItem)
            {
                asd.Add(item.Key, item.Value);
            }
            newItem.leagueItem = (LeagueItemDTO)(object)asd;
            return(newItem);
        }
Пример #6
0
 private AsObject BuildAsync(object body)
 {
     AsObject obj = new AsObject();
     obj.Add("Body", body);
     return obj;
 }