public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (BuyerId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PrimaryPhone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SecondaryPhone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Fax?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (WebSite?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Company?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AnnualTurnOver?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LegalRepresentative?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Rating?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CreditInsurance.GetHashCode()); hashCode = hashCode * -1521134295 + (Logo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressOne?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressTwo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (VatNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ContactPerson?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Prefix?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Temp?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (UserName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PasswordHash?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SecurityStamp?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (EmailConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (LockoutEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (PhoneNumberConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (TwoFactorEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (AccessFailedCount?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Name?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Email?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PhoneNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LockoutEndDate?.GetHashCode() ?? 0); return(hashCode); }
/// <summary> /// Метод возвращает хэш-код объекта. /// </summary> /// <returns>Хэш-код объекта.</returns> public override int GetHashCode() { return (EMail.GetHashCode() + Name.GetHashCode() + BirthDate.GetHashCode() + DriverLicenseDate.GetHashCode() + PasswordHash.GetHashCode()); }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (BusinessEntityId == default(int) ? 0 : BusinessEntityId.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (PasswordHash == null ? 0 : PasswordHash.GetHashCode()); hash = hash * 23 + (PasswordSalt == null ? 0 : PasswordSalt.GetHashCode()); hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode()); return(hash); } }
public override int GetHashCode() { int result = 0; try { result += ID.GetHashCode() + Login.GetHashCode() + PasswordHash.GetHashCode() + PublicName.GetHashCode() + UserRole.GetHashCode() + IsBanned.GetHashCode(); } catch (StackOverflowException ex) { Console.WriteLine(ex.Message); } return(result); }
/// <summary> /// Возвращает хэш код объекта. /// </summary> /// <returns>Хэш код объекта.</returns> public override int GetHashCode() { int result = 0; try { result += ID.GetHashCode() + Login.GetHashCode() + PasswordHash.GetHashCode() + PublicName.GetHashCode() + UserRole.GetHashCode() + IsBanned.GetHashCode(); } catch (Exception ex) { throw ex; } return(result); }
public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (InvestorId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PrimaryPhone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SecondaryPhone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Fax?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (WebSite?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Company?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ContactPerson?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Logo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SupervisingAuthority?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RegistrationNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DomainFocus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TurnOver?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (VatNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressTwo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (AddressOne?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ManagingDirector?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TargetMarket?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CustomerSizeFrom?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CustomerSizeTo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LocalJurisdiction?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CommercialRegNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OtherMinRequirements?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CRR.GetHashCode()); hashCode = hashCode * -1521134295 + (UploadCompliance?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OtherMemberships?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OtherDomainFocus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (InvestorStatus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (IAFC.GetHashCode()); hashCode = hashCode * -1521134295 + (Prefix?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (UserName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PasswordHash?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SecurityStamp?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (EmailConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (LockoutEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (PhoneNumberConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (TwoFactorEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (AccessFailedCount?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Name?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Email?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PhoneNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LockoutEndDate?.GetHashCode() ?? 0); return(hashCode); }
public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (UserName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PasswordHash?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (SecurityStamp?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (EmailConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (LockoutEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (PhoneNumberConfirmed.GetHashCode()); hashCode = hashCode * -1521134295 + (TwoFactorEnabled.GetHashCode()); hashCode = hashCode * -1521134295 + (AccessFailedCount?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Name?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Email?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (PhoneNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (LockoutEndDate?.GetHashCode() ?? 0); return(hashCode); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (CreatedDT.Length != 0) { hash ^= CreatedDT.GetHashCode(); } if (ModifiedDT.Length != 0) { hash ^= ModifiedDT.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (LoginName.Length != 0) { hash ^= LoginName.GetHashCode(); } if (PasswordHash.Length != 0) { hash ^= PasswordHash.GetHashCode(); } if (AuthenticationToken.Length != 0) { hash ^= AuthenticationToken.GetHashCode(); } if (IsActive != false) { hash ^= IsActive.GetHashCode(); } if (IsAdmin != false) { hash ^= IsAdmin.GetHashCode(); } return(hash); }
public void TestEquality() { using (PasswordHash pwd1 = new PasswordHash(TEST_PASSWORD)) using (PasswordHash pwd2 = new PasswordHash(TEST_PASSWORD, pwd1.Salt)) { Assert.AreEqual(pwd1, pwd2); Assert.AreEqual(pwd1.Salt.ToArray(), pwd2.Salt.ToArray()); Assert.AreEqual(pwd1.ToArray(), pwd2.ToArray()); Assert.IsTrue(pwd1 == pwd2); Assert.IsTrue(pwd1 == pwd2); Assert.IsFalse(pwd1 != pwd2); Assert.IsTrue(pwd1.Equals(pwd2)); Assert.IsTrue(pwd1.Equals((object)pwd2)); Assert.AreEqual(0, pwd1.CompareTo(pwd2)); Assert.AreEqual(pwd1.GetHashCode(), pwd2.GetHashCode()); Assert.AreEqual(pwd1.ToString(), pwd2.ToString()); PasswordHash nil = null; Assert.IsFalse(pwd1 < nil); Assert.IsTrue(pwd1 > nil); Assert.AreEqual(1, pwd1.CompareTo(null)); } }
public override int GetHashCode() { unchecked { return(((Email != null ? Email.GetHashCode() : 0) * 397) ^ (PasswordHash != null ? PasswordHash.GetHashCode() : 0)); } }