public static UpdateGatheringRequest FromDict(JsonData data)
 {
     return(new UpdateGatheringRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         gatheringName = data.Keys.Contains("gatheringName") && data["gatheringName"] != null ? data["gatheringName"].ToString(): null,
         attributeRanges = data.Keys.Contains("attributeRanges") && data["attributeRanges"] != null ? data["attributeRanges"].Cast <JsonData>().Select(value =>
         {
             return AttributeRange.FromDict(value);
         }
                                                                                                                                                       ).ToList() : null,
         duplicationAvoider = data.Keys.Contains("duplicationAvoider") && data["duplicationAvoider"] != null ? data["duplicationAvoider"].ToString(): null,
     });
 }
예제 #2
0
 public static CreateGatheringRequest FromDict(JsonData data)
 {
     return(new CreateGatheringRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         player = data.Keys.Contains("player") && data["player"] != null?global::Gs2.Gs2Matchmaking.Model.Player.FromDict(data["player"]) : null,
                      attributeRanges = data.Keys.Contains("attributeRanges") && data["attributeRanges"] != null ? data["attributeRanges"].Cast <JsonData>().Select(value =>
         {
             return AttributeRange.FromDict(value);
         }
                                                                                                                                                                    ).ToList() : null,
                      capacityOfRoles = data.Keys.Contains("capacityOfRoles") && data["capacityOfRoles"] != null ? data["capacityOfRoles"].Cast <JsonData>().Select(value =>
         {
             return CapacityOfRole.FromDict(value);
         }
                                                                                                                                                                    ).ToList() : null,
                      allowUserIds = data.Keys.Contains("allowUserIds") && data["allowUserIds"] != null ? data["allowUserIds"].Cast <JsonData>().Select(value =>
         {
             return value.ToString();
         }
                                                                                                                                                        ).ToList() : null,
                      expiresAt = data.Keys.Contains("expiresAt") && data["expiresAt"] != null ? (long?)long.Parse(data["expiresAt"].ToString()) : null,
                      duplicationAvoider = data.Keys.Contains("duplicationAvoider") && data["duplicationAvoider"] != null ? data["duplicationAvoider"].ToString(): null,
     });
 }