public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is Address other && ((AddressLine1 == null && other.AddressLine1 == null) || (AddressLine1?.Equals(other.AddressLine1) == true)) && ((AddressLine2 == null && other.AddressLine2 == null) || (AddressLine2?.Equals(other.AddressLine2) == true)) && ((AddressLine3 == null && other.AddressLine3 == null) || (AddressLine3?.Equals(other.AddressLine3) == true)) && ((Locality == null && other.Locality == null) || (Locality?.Equals(other.Locality) == true)) && ((Sublocality == null && other.Sublocality == null) || (Sublocality?.Equals(other.Sublocality) == true)) && ((Sublocality2 == null && other.Sublocality2 == null) || (Sublocality2?.Equals(other.Sublocality2) == true)) && ((Sublocality3 == null && other.Sublocality3 == null) || (Sublocality3?.Equals(other.Sublocality3) == true)) && ((AdministrativeDistrictLevel1 == null && other.AdministrativeDistrictLevel1 == null) || (AdministrativeDistrictLevel1?.Equals(other.AdministrativeDistrictLevel1) == true)) && ((AdministrativeDistrictLevel2 == null && other.AdministrativeDistrictLevel2 == null) || (AdministrativeDistrictLevel2?.Equals(other.AdministrativeDistrictLevel2) == true)) && ((AdministrativeDistrictLevel3 == null && other.AdministrativeDistrictLevel3 == null) || (AdministrativeDistrictLevel3?.Equals(other.AdministrativeDistrictLevel3) == true)) && ((PostalCode == null && other.PostalCode == null) || (PostalCode?.Equals(other.PostalCode) == true)) && ((Country == null && other.Country == null) || (Country?.Equals(other.Country) == true)) && ((FirstName == null && other.FirstName == null) || (FirstName?.Equals(other.FirstName) == true)) && ((LastName == null && other.LastName == null) || (LastName?.Equals(other.LastName) == true)) && ((Organization == null && other.Organization == null) || (Organization?.Equals(other.Organization) == true))); }
/// Returns true if User instances are equal /// <param name="other">Instance of User to be compared</param> /// <returns>Boolean</returns> public bool Equals(User other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Username == other.Username || Username != null && Username.Equals(other.Username) ) && ( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) )); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(User other) { if (other == null) { return(false); } return( Id == other.Id && Login.Equals(other.Login) //&& Password.Equals(other.Password) && FirstName.Equals(other.FirstName) && LastName.Equals(other.LastName) && Email.Equals(other.Email) && MailNotification.Equals(other.MailNotification) && (ApiKey != null ? ApiKey.Equals(other.ApiKey) : other.ApiKey == null) && AuthenticationModeId == other.AuthenticationModeId && CreatedOn == other.CreatedOn && LastLoginOn == other.LastLoginOn && Status == other.Status && MustChangePassword == other.MustChangePassword && (CustomFields != null ? CustomFields.Equals <IssueCustomField>(other.CustomFields) : other.CustomFields == null) && (Memberships != null ? Memberships.Equals <Membership>(other.Memberships): other.Memberships == null) && (Groups != null ? Groups.Equals <UserGroup>(other.Groups) : other.Groups == null) ); }
/// <summary> /// Returns true if User instances are equal /// </summary> /// <param name="other">Instance of User to be compared</param> /// <returns>Boolean</returns> public bool Equals(User other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) )); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is V1Employee other && ((Context == null && other.Context == null) || (Context?.Equals(other.Context) == true)) && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((FirstName == null && other.FirstName == null) || (FirstName?.Equals(other.FirstName) == true)) && ((LastName == null && other.LastName == null) || (LastName?.Equals(other.LastName) == true)) && ((RoleIds == null && other.RoleIds == null) || (RoleIds?.Equals(other.RoleIds) == true)) && ((AuthorizedLocationIds == null && other.AuthorizedLocationIds == null) || (AuthorizedLocationIds?.Equals(other.AuthorizedLocationIds) == true)) && ((Email == null && other.Email == null) || (Email?.Equals(other.Email) == true)) && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) && ((ExternalId == null && other.ExternalId == null) || (ExternalId?.Equals(other.ExternalId) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true))); }
/// <summary> /// Returns true if IndividualParams instances are equal /// </summary> /// <param name="other">Instance of IndividualParams to be compared</param> /// <returns>Boolean</returns> public bool Equals(IndividualParams other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( MiddleName == other.MiddleName || MiddleName != null && MiddleName.Equals(other.MiddleName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( DateBirthDay == other.DateBirthDay || DateBirthDay != null && DateBirthDay.Equals(other.DateBirthDay) )); }
/// <summary> /// Returns true if AddInstructorRequest instances are equal /// </summary> /// <param name="other">Instance of AddInstructorRequest to be compared</param> /// <returns>Boolean</returns> public bool Equals(AddInstructorRequest other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) )); }
/// <summary> /// Returns true if Consumer instances are equal /// </summary> /// <param name="input">Instance of Consumer to be compared</param> /// <returns>Boolean</returns> public bool Equals(Consumer input) { if (input == null) { return(false); } return (( Id == input.Id || Id != null && Id.Equals(input.Id) ) && ( Email == input.Email || Email != null && Email.Equals(input.Email) ) && ( FirstName == input.FirstName || FirstName != null && FirstName.Equals(input.FirstName) ) && ( LastName == input.LastName || LastName != null && LastName.Equals(input.LastName) ) && ( Phone == input.Phone || Phone != null && Phone.Equals(input.Phone) )); }
/// <summary> /// Returns true if AirlinePassenger instances are equal /// </summary> /// <param name="other">Instance of AirlinePassenger to be compared</param> /// <returns>Boolean</returns> public bool Equals(AirlinePassenger other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) ) && ( SurnamePrefix == other.SurnamePrefix || SurnamePrefix != null && SurnamePrefix.Equals(other.SurnamePrefix) ) && ( Title == other.Title || Title != null && Title.Equals(other.Title) )); }
public override bool Equals(object obj) { MyCustomType test = obj as MyCustomType; if (test != null) { if (!FirstName.Equals(test.FirstName)) { return(false); } if (!LastName.Equals(test.LastName)) { return(false); } if (!WhateverDate.Equals(test.WhateverDate)) { return(false); } if (!YouKnowIt.Equals(test.YouKnowIt)) { return(false); } if (!Items.SequenceEqual(test.Items)) { return(false); } return(true); } return(false); }
/// <summary> /// Returns true if PersonalNameToken instances are equal /// </summary> /// <param name="other">Instance of PersonalNameToken to be compared</param> /// <returns>Boolean</returns> public bool Equals(PersonalNameToken other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) ) && ( SurnamePrefix == other.SurnamePrefix || SurnamePrefix != null && SurnamePrefix.Equals(other.SurnamePrefix) )); }
public bool Equals(Trainer other) { if (other == null) { return(false); } return(FirstName.Equals(other.FirstName) && LastName.Equals(other.LastName) && Subject.Equals(other.Subject)); }
public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { if (FirstName.Equals(LastName, StringComparison.OrdinalIgnoreCase)) { yield return(new ValidationResult("姓和名不能一样", new[] { nameof(FirstName), nameof(LastName) })); } }
public override bool Equals(object persona) { var persona2 = (Person)persona; return(Id.Equals(persona2.Id) && FirstName.Equals(persona2.FirstName) && LastName.Equals(persona2.LastName)); }
/// <summary> /// Returns true if PaymentProduct840CustomerAccount instances are equal /// </summary> /// <param name="other">Instance of PaymentProduct840CustomerAccount to be compared</param> /// <returns>Boolean</returns> public bool Equals(PaymentProduct840CustomerAccount other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AccountId == other.AccountId || AccountId != null && AccountId.Equals(other.AccountId) ) && ( BillingAgreementId == other.BillingAgreementId || BillingAgreementId != null && BillingAgreementId.Equals(other.BillingAgreementId) ) && ( CompanyName == other.CompanyName || CompanyName != null && CompanyName.Equals(other.CompanyName) ) && ( CountryCode == other.CountryCode || CountryCode != null && CountryCode.Equals(other.CountryCode) ) && ( CustomerAccountStatus == other.CustomerAccountStatus || CustomerAccountStatus != null && CustomerAccountStatus.Equals(other.CustomerAccountStatus) ) && ( CustomerAddressStatus == other.CustomerAddressStatus || CustomerAddressStatus != null && CustomerAddressStatus.Equals(other.CustomerAddressStatus) ) && ( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( PayerId == other.PayerId || PayerId != null && PayerId.Equals(other.PayerId) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) )); }
/// <summary> /// Returns true if Person instances are equal /// </summary> /// <param name="other">Instance of Person to be compared</param> /// <returns>Boolean</returns> public bool Equals(Person other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( Surname == other.Surname || Surname != null && Surname.Equals(other.Surname) ) && ( DateOfBirth == other.DateOfBirth || DateOfBirth != null && DateOfBirth.Equals(other.DateOfBirth) ) && ( PersonGender == other.PersonGender || PersonGender.Equals(other.PersonGender) ) && ( MatchId == other.MatchId || MatchId != null && MatchId.Equals(other.MatchId) ) && ( AllocatePersonId == other.AllocatePersonId || AllocatePersonId != null && AllocatePersonId.Equals(other.AllocatePersonId) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( TelephoneNumber == other.TelephoneNumber || TelephoneNumber != null && TelephoneNumber.Equals(other.TelephoneNumber) ) && ( ExtSystemId == other.ExtSystemId || ExtSystemId != null && ExtSystemId.Equals(other.ExtSystemId) )); }
public bool Equals(User u) { if ((object)u == null) { return(false); } return((UserId == u.UserId) && FirstName.Equals(u.FirstName) && LastName.Equals(u.LastName)); }
public bool Equals(Student other) { if (other == null) { return(false); } return(FirstName.Equals(other.FirstName) && LastName.Equals(other.LastName) && DateOfBirth == other.DateOfBirth && TuitionFees == other.TuitionFees); }
// The below methods are necessary to prevent duplicates in RecordSet public bool Equals(Record other) { // consider records equal if LastName, FirstName, Gender and DateOfBirth are equal // Favorite Color is not considered return(LastName.Equals(other.LastName, StringComparison.InvariantCultureIgnoreCase) && FirstName.Equals(other.FirstName, StringComparison.InvariantCultureIgnoreCase) && Gender == other.Gender && DateOfBirth.Equals(other.DateOfBirth)); }
public override bool Equals(object obj) { if (obj is Abonent a) { return(FirstName.Equals(a.FirstName) && LastName.Equals(a.LastName)); } return(false); }
public override bool Equals(object obj) { var anotherHuman = obj as Human; return(FirstName.Equals(anotherHuman.FirstName) && LastName.Equals(anotherHuman.LastName) && BirthDate.Equals(anotherHuman.BirthDate) && Age == anotherHuman.Age); }
public bool Equals(Student s) { return(IndexNo.Equals(s.IndexNo) && FirstName.Equals(s.FirstName) && LastName.Equals(s.LastName) && BirthPlace.Equals(s.BirthPlace) && BirthDate.Equals(s.BirthDate) && GroupId.Equals(s.GroupId)); }
public void Equals_When_types_are_same_and_underlying_values_are_different_Then_returns_false() { FirstName john = new FirstName("John"); FirstName jane = new FirstName("Jane"); var isEqual = john.Equals(jane); isEqual.Should().BeFalse(); }
public void Equals_When_types_are_different_and_underlying_value_is_same_Then_returns_false() { FirstName john1 = new FirstName("John"); LastName john2 = new LastName("John"); var isEqual = john1.Equals(john2); isEqual.Should().BeFalse(); }
public void Equals_When_types_are_same_and_underlying_value_is_same_Then_returns_true() { FirstName john1 = new FirstName("John"); FirstName john2 = new FirstName("John"); var isEqual = john1.Equals(john2); isEqual.Should().BeTrue(); }
public bool Equals(People people) { return(FirstName.Equals(people.FirstName) && LastName.Equals(people.LastName) && Address.Equals(people.Address) && DateOfBirth.Equals(people.DateOfBirth) && Interests.Equals(people.Interests) && Gender.Equals(people.Gender) && Image.Equals(people.Image)); }
public bool Equals(BookingRecord other) { return(other != null && FirstName != null && FirstName.Equals(other.FirstName) && Surname != null && Surname.Equals(other.Surname) && Price != null && Price.Equals(other.Price) && Deposit != null && Deposit.Equals(other.Deposit) && CheckIn != null && CheckIn.Equals(other.CheckIn) && CheckIn != null && CheckIn.Equals(other.CheckIn)); }
public bool Equals(User obj) { return(obj != null && UserName.Equals(obj.UserName) && FirstName.Equals(obj.FirstName) && LastName.Equals(obj.LastName) && Password.Equals(obj.Password) && Image.Equals(obj.Image) && EmailAddress == obj.EmailAddress); }
public bool Equals(Person person) { return(FirstName.Equals(person.FirstName) && LastName.Equals(person.LastName) && Address.Equals(person.Address) && DateOfBirth.Equals(person.DateOfBirth) && Hobbies.Equals(person.Hobbies) && Gender.Equals(person.Gender) && Image.Equals(person.Image)); }
public override bool Equals(object obj) { var item = obj as Friend; if (item == null) { return(false); } return(FirstName.Equals(item.FirstName) && LastName.Equals(item.LastName)); }