public bool FromJSON(JToken token) { AccountDBKey = JSONUtility.GetValue(token, "AccountDBKey", Default.AccountDBKey); PermissionType = JSONUtility.GetValueEnum(token, "PermissionType", Default.PermissionType); Level = JSONUtility.GetValue(token, "Level", Default.Level); RegisterTime = JSONUtility.GetValue(token, "RegisterTime", Default.RegisterTime); return(true); }
public bool FromJSON(JToken token) { Host = JSONUtility.GetValue(token, "host", Default.Host); Port = JSONUtility.GetValue(token, "port", Default.Port); Database = JSONUtility.GetValue(token, "database", Default.Database); ID = JSONUtility.GetValue(token, "id", Default.ID); Password = JSONUtility.GetValue(token, "password", Default.Password); return(true); }
public bool FromJSON(JToken token) { AccountDBKey = JSONUtility.GetValue(token, "AccountDBKey", Default.AccountDBKey); CreateTime = JSONUtility.GetValue(token, "CreateTime", Default.CreateTime); GivenName = JSONUtility.GetValue(token, "GivenName", Default.GivenName); SurName = JSONUtility.GetValue(token, "SurName", Default.SurName); Username = JSONUtility.GetValue(token, "Username", Default.Username); EMail = JSONUtility.GetValue(token, "EMail", Default.EMail); Password = JSONUtility.GetValue(token, "Password", Default.Password); RegionCodeForNumber = JSONUtility.GetValue(token, "RegionCodeForNumber", Default.RegionCodeForNumber); CountryCode = JSONUtility.GetValue(token, "CountryCode", Default.CountryCode); NationalNumber = JSONUtility.GetValue(token, "NationalNumber", Default.NationalNumber); return(true); }
public bool FromJSON(JToken token) { Name = JSONUtility.GetValue(token, "name", string.Empty); MaxExecuteQueryPerFrame = JSONUtility.GetValue(token, "max_execute_query_per_frame", Default.MaxExecuteQueryPerFrame); double pingIntervalMS = JSONUtility.GetValue(token, "ping_interval", Default.PingInterval.TotalMilliseconds); PingInterval = TimeSpan.FromMilliseconds(pingIntervalMS); if (ConnectionData.FromJSON(token["connection_data"]) == false) { return(false); } return(true); }
public bool FromJSON(JToken token) { if (BasicData.FromJSON(token["BasicData"]) == false) { return(false); } if (Permissions.FromJSON(token["Permissions"]) == false) { return(false); } TimeZoneOffset = JSONUtility.GetValue(token, "TimeZoneOffset", Default.TimeZoneOffset); return(true); }