示例#1
0
 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);
 }
示例#2
0
 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);
 }
示例#3
0
 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);
 }
示例#4
0
        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);
        }
示例#5
0
        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);
        }