public Dictionary <string, object> toDictionary() { Dictionary <string, object> v_parsedRegister = new Dictionary <string, object>(); v_parsedRegister.Add("hardwareId", HardwareId); v_parsedRegister.Add("registerTime", RegisterTime.ToString("yyyy-MM-dd'T'HH:mm:ss.fffZ")); v_parsedRegister.Add("sensorId", SensorId); v_parsedRegister.Add("temperature", Temperature); return(v_parsedRegister); }
/// <summary> /// /// </summary> /// <param name="account">账户名</param> /// <param name="password">密码</param> /// <param name="inviteAccountId">邀请者账号</param> /// <param name="appleId">应用id</param> /// <param name="referer">来源地址</param> public Users(string account, string password, string inviteAccountId = "", string appleId = "", string referer = "") : this() { this.Account = account; this.SecretKey = Math.Abs($"{this.Id}_{RegisterTime.GetTimeSpan(DateTimeKind.Utc)}".GetHashCode()) .ToString(); this.Password = SecurityCommon.Sha256($"{password}_{SecretKey}"); this.Name = "匿名账户" + DateTime.Now.GetTimeSpan(); this.UserSources = new UserSources(inviteAccountId, appleId, referer); this.AddDomainEvent(new RegisterUserEvent(this.Account, this.Id, inviteAccountId, appleId, referer)); }
public override string ToString() { return(string.Format("客户端注册信息 Tel=:{0} Socket.Connected={1} RegisterTime={2} LastVistTime={3}", TelOrGprsId, socket.Connected, RegisterTime.ToString(), LastVisitTime.ToString())); }