public override int GetHashCode() { int hash = 1; if (header_ != null) { hash ^= Header.GetHashCode(); } if (UserName.Length != 0) { hash ^= UserName.GetHashCode(); } if (Password.Length != 0) { hash ^= Password.GetHashCode(); } if (ValidCode.Length != 0) { hash ^= ValidCode.GetHashCode(); } if (ValidId.Length != 0) { hash ^= ValidId.GetHashCode(); } if (PhoneNumber.Length != 0) { hash ^= PhoneNumber.GetHashCode(); } if (DeviceCode.Length != 0) { hash ^= DeviceCode.GetHashCode(); } if (InviteCode.Length != 0) { hash ^= InviteCode.GetHashCode(); } if (LoginType != 0) { hash ^= LoginType.GetHashCode(); } if (Register != false) { hash ^= Register.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
private async Task LogHistory(LoginType loginType, LoginStatus status, string clientId, string username, string deviceKey, string apiKey, string clientIp = null, string clientUri = null) { var unityContainer = UnityConfig.GetConfiguredContainer() as UnityContainer; var loginHistoryBll = unityContainer.Resolve<ILoginHistoryBll>(); if (string.IsNullOrEmpty(clientIp)) clientIp =SecurityUtils.GetClientIPAddress(); if (string.IsNullOrEmpty(clientUri) && HttpContext.Current != null) clientUri = HttpContext.Current.Request.Url.AbsoluteUri; int num = await loginHistoryBll.InsertLoginHistory(new InsertLoginHistoryInput() { Type = loginType.GetHashCode(), UserName = username, LoginTime = DateTime.Now, LoginStatus = status.GetHashCode(), AppId = string.IsNullOrEmpty(clientId) ? null : clientId, ClientUri = clientUri, ClientIP = clientIp, ClientUA = HttpContext.Current.Request.UserAgent, ClientApiKey = apiKey, ClientDevice = deviceKey }); }
public override int GetHashCode() { int hash = 1; if (Uuid.Length != 0) { hash ^= Uuid.GetHashCode(); } if (LoginType != 0) { hash ^= LoginType.GetHashCode(); } if (AppVersion.Length != 0) { hash ^= AppVersion.GetHashCode(); } if (AppStore.Length != 0) { hash ^= AppStore.GetHashCode(); } if (DeviceModel.Length != 0) { hash ^= DeviceModel.GetHashCode(); } if (DeviceCountry.Length != 0) { hash ^= DeviceCountry.GetHashCode(); } if (DeviceLanguage.Length != 0) { hash ^= DeviceLanguage.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
private async Task LogHistory(LoginType loginType, LoginStatus status, string ownerUsername, string username, string device, string apiKey) { string clientIp = SecurityUtils.GetClientIPAddress(); string clientUri = HttpContext.Current.Request.Url.AbsoluteUri; int num = await _loginHistoryBll.InsertLoginHistory(new InsertLoginHistoryInput { Type = loginType.GetHashCode(), UserName = username, LoginTime = DateTime.Now, LoginStatus = status.GetHashCode(), AppId = string.IsNullOrEmpty(ownerUsername) ? null : ownerUsername, ClientUri = clientUri, ClientIP = clientIp, ClientUA = HttpContext.Current.Request.UserAgent, ClientApiKey = apiKey, ClientDevice = device }); }