public IUserVisitor Visit(EmailVerified @event) { var origUser = this.users.Single(u => u.Id == @event.UserId); var newUser = new User( origUser.Id, origUser.Name, origUser.Password, origUser.Email, true); var newUsers = this.users .Where(u => u.Id != newUser.Id) .Concat(new[] { newUser }); return new UserVisitor(newUsers); }
public override int GetHashCode() { int hash = 1; if (Id != 0) { hash ^= Id.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Height != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Height); } if (Weight != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight); } if (Avator.Length != 0) { hash ^= Avator.GetHashCode(); } if (Email.Length != 0) { hash ^= Email.GetHashCode(); } if (EmailVerified != false) { hash ^= EmailVerified.GetHashCode(); } hash ^= phoneNumber_.GetHashCode(); if (Gender != global::My.Project.Gender.NotSpecified) { hash ^= Gender.GetHashCode(); } if (birthday_ != null) { hash ^= Birthday.GetHashCode(); } hash ^= addresses_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Uid.Length != 0) { hash ^= Uid.GetHashCode(); } if (Email.Length != 0) { hash ^= Email.GetHashCode(); } if (EmailVerified != false) { hash ^= EmailVerified.GetHashCode(); } if (DisplayName.Length != 0) { hash ^= DisplayName.GetHashCode(); } if (PhotoURL.Length != 0) { hash ^= PhotoURL.GetHashCode(); } if (Disabled != false) { hash ^= Disabled.GetHashCode(); } if (metadata_ != null) { hash ^= Metadata.GetHashCode(); } hash ^= providerData_.GetHashCode(); if (PhoneNumber.Length != 0) { hash ^= PhoneNumber.GetHashCode(); } if (customClaims_ != null) { hash ^= CustomClaims.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Email.Length != 0) { hash ^= Email.GetHashCode(); } if (EmailVerified != false) { hash ^= EmailVerified.GetHashCode(); } if (Birthdate.Length != 0) { hash ^= Birthdate.GetHashCode(); } if (Gender != global::Spotify.Login5.V3.UserInfo.Types.Gender.Unknown) { hash ^= Gender.GetHashCode(); } if (PhoneNumber.Length != 0) { hash ^= PhoneNumber.GetHashCode(); } if (PhoneNumberVerified != false) { hash ^= PhoneNumberVerified.GetHashCode(); } if (EmailAlreadyRegistered != false) { hash ^= EmailAlreadyRegistered.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Id != 0) { hash ^= Id.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Age != 0) { hash ^= Age.GetHashCode(); } if (Gender != global::Simon.GrpcService.API.Gender.Unknow) { hash ^= Gender.GetHashCode(); } if (Weight != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight); } if (EmailVerified != false) { hash ^= EmailVerified.GetHashCode(); } hash ^= phone_.GetHashCode(); if (Salary != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Salary); } hash ^= myAdd_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Iss != null) { hashCode = hashCode * 59 + Iss.GetHashCode(); } if (Sub != null) { hashCode = hashCode * 59 + Sub.GetHashCode(); } if (Aud != null) { hashCode = hashCode * 59 + Aud.GetHashCode(); } if (Exp != null) { hashCode = hashCode * 59 + Exp.GetHashCode(); } if (Nbf != null) { hashCode = hashCode * 59 + Nbf.GetHashCode(); } if (Iat != null) { hashCode = hashCode * 59 + Iat.GetHashCode(); } if (Jti != null) { hashCode = hashCode * 59 + Jti.GetHashCode(); } if (Uuid != null) { hashCode = hashCode * 59 + Uuid.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (GivenName != null) { hashCode = hashCode * 59 + GivenName.GetHashCode(); } if (Nickname != null) { hashCode = hashCode * 59 + Nickname.GetHashCode(); } if (Email != null) { hashCode = hashCode * 59 + Email.GetHashCode(); } if (EmailVerified != null) { hashCode = hashCode * 59 + EmailVerified.GetHashCode(); } if (Zoneinfo != null) { hashCode = hashCode * 59 + Zoneinfo.GetHashCode(); } if (Locale != null) { hashCode = hashCode * 59 + Locale.GetHashCode(); } if (Cnf != null) { hashCode = hashCode * 59 + Cnf.GetHashCode(); } if (Orig != null) { hashCode = hashCode * 59 + Orig.GetHashCode(); } if (Dest != null) { hashCode = hashCode * 59 + Dest.GetHashCode(); } if (Mky != null) { hashCode = hashCode * 59 + Mky.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if JWToken instances are equal /// </summary> /// <param name="other">Instance of JWToken to be compared</param> /// <returns>Boolean</returns> public bool Equals(JWToken other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Iss == other.Iss || Iss != null && Iss.Equals(other.Iss) ) && ( Sub == other.Sub || Sub != null && Sub.Equals(other.Sub) ) && ( Aud == other.Aud || Aud != null && Aud.Equals(other.Aud) ) && ( Exp == other.Exp || Exp != null && Exp.Equals(other.Exp) ) && ( Nbf == other.Nbf || Nbf != null && Nbf.Equals(other.Nbf) ) && ( Iat == other.Iat || Iat != null && Iat.Equals(other.Iat) ) && ( Jti == other.Jti || Jti != null && Jti.Equals(other.Jti) ) && ( Uuid == other.Uuid || Uuid != null && Uuid.Equals(other.Uuid) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( GivenName == other.GivenName || GivenName != null && GivenName.Equals(other.GivenName) ) && ( Nickname == other.Nickname || Nickname != null && Nickname.Equals(other.Nickname) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( EmailVerified == other.EmailVerified || EmailVerified != null && EmailVerified.Equals(other.EmailVerified) ) && ( Zoneinfo == other.Zoneinfo || Zoneinfo != null && Zoneinfo.Equals(other.Zoneinfo) ) && ( Locale == other.Locale || Locale != null && Locale.Equals(other.Locale) ) && ( Cnf == other.Cnf || Cnf != null && Cnf.Equals(other.Cnf) ) && ( Orig == other.Orig || Orig != null && Orig.Equals(other.Orig) ) && ( Dest == other.Dest || Dest != null && Dest.Equals(other.Dest) ) && ( Mky == other.Mky || Mky != null && Mky.Equals(other.Mky) )); }
public void EnterDetails(Table table) { foreach (var row in table.Rows) { switch (row[0].ToLower()) { case "approved": var approved = Convert.ToBoolean(row[1]); if ((Approved.Selected && !approved) || (!Approved.Selected && approved)) { Approved.Click(); } break; case "emailverified": var emailVerified = Convert.ToBoolean(row[1]); if ((EmailVerified.Selected && !emailVerified) || (!EmailVerified.Selected && emailVerified)) { EmailVerified.Click(); } break; case "enabled": var enabled = Convert.ToBoolean(row[1]); if ((Enabled.Selected && !enabled) || (!Enabled.Selected && enabled)) { Enabled.Click(); } break; case "firstname": FirstName.Clear(); FirstName.SendKeys(row[1]); break; case "lastname": LastName.Clear(); LastName.SendKeys(row[1]); break; case "postcode": PostCode.Clear(); PostCode.SendKeys(row[1]); break; case "skypename": SkypeName.Clear(); SkypeName.SendKeys(row[1]); break; case "hometelephonenumber": TelNoHome.Clear(); TelNoHome.SendKeys(row[1]); break; case "mobiletelephonenumber": TelNoMobile.Clear(); TelNoMobile.SendKeys(row[1]); break; case "worktelephonenumber": TelNoWork.Clear(); TelNoWork.SendKeys(row[1]); break; case "title": Title.Clear(); Title.SendKeys(row[1]); break; case "town": Town.Clear(); Town.SendKeys(row[1]); break; default: throw new Exception(string.Format("Field {0} not defined", row[0])); } } }