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); }
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; }
private AsObject BuildAsync(object body) { AsObject obj = new AsObject(); obj.Add("Body", body); return(obj); }
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; }
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); }
private AsObject BuildAsync(object body) { AsObject obj = new AsObject(); obj.Add("Body", body); return obj; }