예제 #1
0
 public TDSGlobalUser(Dictionary <string, object> dic)
 {
     this.userId = SafeDictionary.GetValue <long>(dic, "userId");
     this.sub    = SafeDictionary.GetValue <string>(dic, "sub");
     this.name   = SafeDictionary.GetValue <string>(dic, "name");
     this.token  = new TDSGlobalAccessToken(SafeDictionary.GetValue <Dictionary <string, object> >(dic, "token"));
 }
예제 #2
0
        public TDSGlobalUser(string json)
        {
            Dictionary <string, object> dic = Json.Deserialize(json) as Dictionary <string, object>;

            this.userId        = SafeDictionary.GetValue <long>(dic, "userId");
            this.sub           = SafeDictionary.GetValue <string>(dic, "sub");
            this.name          = SafeDictionary.GetValue <string>(dic, "name");
            this.loginType     = SafeDictionary.GetValue <int>(dic, "loginType");
            this.boundAccounts = SafeDictionary.GetValue <List <string> >(dic, "boundAccounts");
            this.token         = new TDSGlobalAccessToken(SafeDictionary.GetValue <Dictionary <string, object> >(dic, "token"));
        }