コード例 #1
0
        /// <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)
                 ));
        }
コード例 #2
0
        /// <summary>
        /// Determines whether the specified object is equal to the current object.
        /// </summary>
        /// <param name="obj">The object to compare with the current object.</param>
        /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
        public override bool Equals(object obj)
        {
            var result = false;

            if (obj is IdentityDTO item)
            {
                result  = ID == item.ID;
                result &= GUID.Equals(item.GUID);
                result &= Name.Equals(item.Name);
                result &= Surname.Equals(item.Surname);
                result &= Midname.Equals(item.Midname);
                result &= Birthdate.Equals(item.Birthdate);
                result &= Gender.Equals(item.Gender);
                result &= Country.Equals(item.Country);
                result &= City.Equals(item.City);
                result &= Phone.Equals(item.Phone);
                result &= Email.Equals(item.Email);
                result &= Department.Equals(item.Department);
                result &= Group.Equals(item.Group);
                result &= Status.Equals(item.Status);
                result &= Role.Equals(item.Role);
                return(result);
            }
            return(false);
        }
コード例 #3
0
ファイル: User.cs プロジェクト: LayCraft/pssg-cscp-cpu
        // /// <summary>
        // /// Returns the string presentation of the object
        // /// </summary>
        // /// <returns>String presentation of the object</returns>
        // public override string ToString()
        // {
        //  var sb = new StringBuilder();

        //  sb.Append("class User {\n");
        //  sb.Append("  Id: ").Append(ContactId).Append("\n");
        //  sb.Append("  GivenName: ").Append(GivenName).Append("\n");
        //  sb.Append("  Surname: ").Append(Surname).Append("\n");
        //  sb.Append("  Active: ").Append(Active).Append("\n");
        //  sb.Append("  Initials: ").Append(Initials).Append("\n");
        //  sb.Append("  Email: ").Append(Email).Append("\n");
        //  sb.Append("  SmUserId: ").Append(SmUserId).Append("\n");
        //  sb.Append("  Guid: ").Append(AccountId).Append("\n");
        //  sb.Append("  SmAuthorizationDirectory: ").Append(UserType).Append("\n");
        //  sb.Append("  UserRoles: ").Append(UserRoles).Append("\n");
        //  sb.Append("}\n");

        //  return sb.ToString();
        // }

        // /// <summary>
        // /// Returns the JSON string presentation of the object
        // /// </summary>
        // /// <returns>JSON string presentation of the object</returns>
        // public string ToJson()
        // {
        //  return JsonConvert.SerializeObject(this, Formatting.Indented);
        // }

        // /// <summary>
        // /// Returns true if objects are equal
        // /// </summary>
        // /// <param name="obj">Object to be compared</param>
        // /// <returns>Boolean</returns>
        // public override bool Equals(object obj)
        // {
        //  if (obj is null) { return false; }
        //  if (ReferenceEquals(this, obj)) { return true; }
        //  return obj.GetType() == GetType() && Equals((User)obj);
        // }

        /// <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((
                       ContactId == other.ContactId ||
                       ContactId.Equals(other.ContactId)
                       ) &&
                   (
                       GivenName == other.GivenName ||
                       GivenName != null &&
                       GivenName.Equals(other.GivenName)
                   ) &&
                   (
                       Surname == other.Surname ||
                       Surname != null &&
                       Surname.Equals(other.Surname)
                   ) &&
                   (
                       Active == other.Active ||
                       Active.Equals(other.Active)
                   ) &&
                   (
                       Initials == other.Initials ||
                       Initials != null &&
                       Initials.Equals(other.Initials)
                   ) &&
                   (
                       Email == other.Email ||
                       Email != null &&
                       Email.Equals(other.Email)
                   ) &&
                   (
                       SmUserId == other.SmUserId ||
                       SmUserId != null &&
                       SmUserId.Equals(other.SmUserId)
                   ) &&
                   (
                       AccountId == other.AccountId ||
                       AccountId != null &&
                       AccountId.Equals(other.AccountId)
                   ) &&
                   (
                       UserType == other.UserType ||
                       UserType != null &&
                       UserType.Equals(other.UserType)
                   ) &&
                   (
                       UserRoles == other.UserRoles ||
                       UserRoles != null &&
                       UserRoles.SequenceEqual(other.UserRoles)
                   ));
        }
コード例 #4
0
        /// <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)
                 ));
        }
コード例 #5
0
ファイル: Person.cs プロジェクト: AllocateSoftware/API-Stubs
        /// <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)
                 ));
        }
コード例 #6
0
ファイル: CurrentUserViewModel.cs プロジェクト: rstens/hets
        /// <summary>
        /// Returns true if CurrentUserViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of CurrentUserViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CurrentUserViewModel other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     GivenName == other.GivenName ||
                     GivenName != null &&
                     GivenName.Equals(other.GivenName)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     Active == other.Active ||
                     Active != null &&
                     Active.Equals(other.Active)
                 ) &&
                 (
                     SmUserId == other.SmUserId ||
                     SmUserId != null &&
                     SmUserId.Equals(other.SmUserId)
                 ) &&
                 (
                     SmAuthorizationDirectory == other.SmAuthorizationDirectory ||
                     SmAuthorizationDirectory != null &&
                     SmAuthorizationDirectory.Equals(other.SmAuthorizationDirectory)
                 ) &&
                 (
                     UserRoles == other.UserRoles ||
                     UserRoles != null &&
                     UserRoles.SequenceEqual(other.UserRoles)
                 ) &&
                 (
                     District == other.District ||
                     District != null &&
                     District.Equals(other.District)
                 ));
        }
コード例 #7
0
        /// <summary>
        /// Returns true if Identification instances are equal
        /// </summary>
        /// <param name="other">Instance of Identification to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Identification other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     StaffNumber == other.StaffNumber ||
                     StaffNumber != null &&
                     StaffNumber.Equals(other.StaffNumber)
                     ) &&
                 (
                     Title == other.Title ||
                     Title != null &&
                     Title.Equals(other.Title)
                 ) &&
                 (
                     Forenames == other.Forenames ||
                     Forenames != null &&
                     Forenames.Equals(other.Forenames)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     MiddleInitials == other.MiddleInitials ||
                     MiddleInitials != null &&
                     MiddleInitials.Equals(other.MiddleInitials)
                 ) &&
                 (
                     KnownAs == other.KnownAs ||
                     KnownAs != null &&
                     KnownAs.Equals(other.KnownAs)
                 ) &&
                 (
                     Gender == other.Gender ||

                     Gender.Equals(other.Gender)
                 ) &&
                 (
                     DateOfBirth == other.DateOfBirth ||
                     DateOfBirth != null &&
                     DateOfBirth.Equals(other.DateOfBirth)
                 ) &&
                 (
                     Ssn == other.Ssn ||
                     Ssn != null &&
                     Ssn.Equals(other.Ssn)
                 ));
        }
コード例 #8
0
        /// <summary>
        /// Returns true if ModelUser instances are equal
        /// </summary>
        /// <param name="other">Instance of ModelUser 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)
                     ) &&
                 (
                     Password == other.Password ||
                     Password != null &&
                     Password.Equals(other.Password)
                 ) &&
                 (
                     Guid == other.Guid ||
                     Guid != null &&
                     Guid.Equals(other.Guid)
                 ) &&
                 (
                     UserType == other.UserType ||
                     UserType.Equals(other.UserType)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     PhoneNumber == other.PhoneNumber ||
                     PhoneNumber != null &&
                     PhoneNumber.Equals(other.PhoneNumber)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     Discount == other.Discount ||
                     Discount != null &&
                     Discount.Equals(other.Discount)
                 ));
        }
コード例 #9
0
ファイル: UserViewModel.cs プロジェクト: Kiesum/hets
        /// <summary>
        /// Returns true if UserViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of UserViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UserViewModel other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Active == other.Active ||
                     Active.Equals(other.Active)
                 ) &&
                 (
                     GivenName == other.GivenName ||
                     GivenName != null &&
                     GivenName.Equals(other.GivenName)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     SmUserId == other.SmUserId ||
                     SmUserId != null &&
                     SmUserId.Equals(other.SmUserId)
                 ) &&
                 (
                     UserRoles == other.UserRoles ||
                     UserRoles != null &&
                     UserRoles.SequenceEqual(other.UserRoles)
                 ) &&
                 (
                     GroupMemberships == other.GroupMemberships ||
                     GroupMemberships != null &&
                     GroupMemberships.SequenceEqual(other.GroupMemberships)
                 ) &&
                 (
                     District == other.District ||
                     District != null &&
                     District.Equals(other.District)
                 ));
        }
コード例 #10
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            Person personEqu = (Person)obj;

            return(Name.Equals(personEqu.Name) && Surname.Equals(personEqu.Surname));
        }
コード例 #11
0
 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));
 }
コード例 #12
0
        public override bool Equals(object other)
        {
            var otherAuthor = other as Author;

            if (otherAuthor == null)
            {
                return(false);
            }

            return(Name.Equals(otherAuthor.Name) && Surname.Equals(otherAuthor.Surname));
        }
コード例 #13
0
        public bool Equals(Author item)
        {
            var result = true;

            result &= (Id == item.Id);
            result &= (Name.Equals(item.Name));
            result &= (Surname.Equals(item.Surname));
            result &= (BornDate.Equals(item.BornDate));
            result &= (Country.Equals(item.Country));
            return(result);
        }
コード例 #14
0
        /// <summary>
        /// Returns true if HoursAssignmentPerson instances are equal
        /// </summary>
        /// <param name="other">Instance of HoursAssignmentPerson to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(HoursAssignmentPerson other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     StaffNumber == other.StaffNumber ||
                     StaffNumber != null &&
                     StaffNumber.Equals(other.StaffNumber)
                     ) &&
                 (
                     Forenames == other.Forenames ||
                     Forenames != null &&
                     Forenames.Equals(other.Forenames)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     MobileNumber == other.MobileNumber ||
                     MobileNumber != null &&
                     MobileNumber.Equals(other.MobileNumber)
                 ) &&
                 (
                     Grade == other.Grade ||
                     Grade != null &&
                     Grade.Equals(other.Grade)
                 ) &&
                 (
                     GradeType == other.GradeType ||
                     GradeType != null &&
                     GradeType.Equals(other.GradeType)
                 ) &&
                 (
                     GradeTypeCategory == other.GradeTypeCategory ||
                     GradeTypeCategory != null &&
                     GradeTypeCategory.Equals(other.GradeTypeCategory)
                 ) &&
                 (
                     WTE == other.WTE ||

                     WTE.Equals(other.WTE)
                 ));
        }
コード例 #15
0
ファイル: Student.cs プロジェクト: kalexanderk/OOP
 public override bool Equals(object o)
 {
     if (o != null && o is Student)
     {
         Student temp = o as Student;
         return((Name.Equals(temp.Name)) & (Surname.Equals(temp.Surname)) & (Enroll_year == temp.Enroll_year));
     }
     else
     {
         throw new ArgumentException("Error in Equals.");
     }
 }
コード例 #16
0
ファイル: Employee.cs プロジェクト: ShitovaKG-543/EPAM-dotnet
 ////////
 public bool Equals(Employee other)
 {
     if (other == null)
     {
         throw new Exception("employee can not be null");
     }
     return(Surname.Equals(other.Surname) &&
            Name.Equals(other.Name) &&
            MiddleName.Equals(other.MiddleName) &&
            BirthDate.Equals(other.BirthDate) &&
            WorkExperience.Equals(other.WorkExperience) &&
            Position.Equals(other.Position));
 }
コード例 #17
0
        /// <summary>
        /// Определяет равны ли два человека
        /// </summary>
        /// <param name="person">Человек из списка</param>
        /// <returns></returns>
        public override bool Equals(object person)
        {
            var tmpPerson = person as PersonBase;

            if (tmpPerson == null || person == null)
            {
                return(false);
            }

            return(Name.Equals(tmpPerson.Name) &&
                   Surname.Equals(tmpPerson.Surname) &&
                   Age.Equals(tmpPerson.Age) &&
                   Gender.Equals(tmpPerson.Gender));
        }
コード例 #18
0
        /// <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
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     UniversalId == other.UniversalId ||
                     UniversalId != null &&
                     UniversalId.Equals(other.UniversalId)
                 ) &&
                 (
                     FirstName == other.FirstName ||
                     FirstName != null &&
                     FirstName.Equals(other.FirstName)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     TelephoneNumber == other.TelephoneNumber ||
                     TelephoneNumber != null &&
                     TelephoneNumber.Equals(other.TelephoneNumber)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     other.Links != null &&
                     Links.SequenceEqual(other.Links)
                 ));
        }
コード例 #19
0
ファイル: Employee.cs プロジェクト: svd62rus/EmployeeList-2.0
 public bool Equals(Employee other)
 {
     if (other == null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Id.Equals(other.Id) && Name.Equals(other.Name) &&
            Surname.Equals(other.Surname) && Patronymic.Equals(other.Patronymic) &&
            DepartmentId.Equals(other.DepartmentId) && IsFired.Equals(other.IsFired) &&
            Salary.Equals(other.Salary) && DateHired.Equals(other.DateHired) &&
            DateFired.Equals(other.DateFired));
 }
コード例 #20
0
        /// <summary>
        /// Returns true if UserDetailsViewModel instances are equal
        /// </summary>
        /// <param name="other">Instance of UserDetailsViewModel to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UserDetailsViewModel other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Active == other.Active ||
                     Active.Equals(other.Active)
                 ) &&
                 (
                     GivenName == other.GivenName ||
                     GivenName != null &&
                     GivenName.Equals(other.GivenName)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     Initials == other.Initials ||
                     Initials != null &&
                     Initials.Equals(other.Initials)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     Permissions == other.Permissions ||
                     Permissions != null &&
                     Permissions.SequenceEqual(other.Permissions)
                 ));
        }
コード例 #21
0
ファイル: User.cs プロジェクト: anthonynassar/SpiderShareApp
        public override bool Equals(System.Object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            User user = (User)obj;

            return(Email.Equals(user.Email) && Address.Equals(user.Address) &&
                   Profession.Equals(user.Profession) && Privilege.Equals(user.Privilege) &&
                   Username.Equals(user.Username) && GivenName.Equals(user.GivenName) &&
                   Surname.Equals(user.Surname) && Birthdate.Equals(user.Birthdate) &&
                   Gender.Equals(user.Gender) && CultureInfo.Equals(user.CultureInfo) &&
                   City.Equals(user.City) && Country.Equals(user.Country) &&
                   Latitude.Equals(user.Latitude) && Longitude.Equals(user.Longitude));
        }
コード例 #22
0
ファイル: Seller.cs プロジェクト: Sundea/SecondYearCourseWork
        public new bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            Seller seller = obj as Seller;

            if (seller == null)
            {
                return(false);
            }

            return(Name.Equals(seller.Name) && Surname.Equals(seller.Surname) &&
                   recruited.Equals(seller.recruited));
        }
コード例 #23
0
ファイル: Person.cs プロジェクト: TymchukA/Csharp_or_.net
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            Person p = (Person)obj;

            if (this == p)
            {
                return(true);
            }
            return(Name.Equals(p.Name) && Surname.Equals(p.Surname) && Birthday.Equals(p.Birthday));
        }
コード例 #24
0
        public override bool Equals(object obj)
        {
            if (!(obj is UserDto entity))
            {
                return(false);
            }

            if (Id == entity.Id &&
                UserName.Equals(entity.UserName, StringComparison.Ordinal) &&
                PasswordHash.Equals(entity.PasswordHash, StringComparison.Ordinal) &&
                Salt.Equals(entity.Salt, StringComparison.Ordinal) &&
                Email.Equals(entity.Email, StringComparison.Ordinal) &&
                Firstname.Equals(entity.Firstname, StringComparison.OrdinalIgnoreCase) &&
                Surname.Equals(entity.Surname, StringComparison.OrdinalIgnoreCase) &&
                Culture.Equals(entity.Culture, StringComparison.OrdinalIgnoreCase) &&
                Timezone.Equals(entity.Timezone, StringComparison.OrdinalIgnoreCase) &&
                Amount == entity.Amount)
            {
                return(true);
            }

            return(false);
        }
コード例 #25
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            Contact p = (Contact)obj;

            return((Name.Equals(Name, StringComparison.CurrentCulture)) &&
                   (Surname.Equals(p.Surname)) &&
                   (MiddleName.Equals(p.MiddleName)) &&
                   (BirthDate.Equals(p.BirthDate)) &&
                   (Phone.Equals(p.Phone)) &&
                   (TaxNumber.Equals(p.TaxNumber)) &&
                   (Gender.Equals(p.Gender)) &&
                   (Job.Equals(p.Job)) &&
                   (Position.Equals(p.Position)));
        }
コード例 #26
0
 /// <summary>
 /// Checks if a player object is equal to a given player object
 /// </summary>
 /// <param name="other">player object to check for equality</param>
 /// <returns>true if objects are equal, false otherwise</returns>
 public bool Equals(Player other)
 {
     return(Team.Equals(other.Team) && Name.Equals(other.Name) && Surname.Equals(other.Surname));
 }
コード例 #27
0
        /// <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.Equals(other.Id)
                     ) &&
                 (
                     GivenName == other.GivenName ||
                     GivenName != null &&
                     GivenName.Equals(other.GivenName)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     Active == other.Active ||
                     Active.Equals(other.Active)
                 ) &&
                 (
                     Initials == other.Initials ||
                     Initials != null &&
                     Initials.Equals(other.Initials)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     SmUserId == other.SmUserId ||
                     SmUserId != null &&
                     SmUserId.Equals(other.SmUserId)
                 ) &&
                 (
                     Guid == other.Guid ||
                     Guid != null &&
                     Guid.Equals(other.Guid)
                 ) &&
                 (
                     SmAuthorizationDirectory == other.SmAuthorizationDirectory ||
                     SmAuthorizationDirectory != null &&
                     SmAuthorizationDirectory.Equals(other.SmAuthorizationDirectory)
                 ) &&
                 (
                     UserRoles == other.UserRoles ||
                     UserRoles != null &&
                     UserRoles.SequenceEqual(other.UserRoles)
                 ));
        }
コード例 #28
0
ファイル: UserSubmit.cs プロジェクト: paulvancoller/A3S
        /// <summary>
        /// Returns true if UserSubmit instances are equal
        /// </summary>
        /// <param name="other">Instance of UserSubmit to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UserSubmit other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Uuid == other.Uuid ||
                     Uuid != null &&
                     Uuid.Equals(other.Uuid)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     Username == other.Username ||
                     Username != null &&
                     Username.Equals(other.Username)
                 ) &&
                 (
                     Password == other.Password ||
                     Password != null &&
                     Password.Equals(other.Password)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     PhoneNumber == other.PhoneNumber ||
                     PhoneNumber != null &&
                     PhoneNumber.Equals(other.PhoneNumber)
                 ) &&
                 (
                     Avatar == other.Avatar ||
                     Avatar != null &&
                     Avatar.Equals(other.Avatar)
                 ) &&
                 (
                     LdapAuthenticationModeId == other.LdapAuthenticationModeId ||
                     LdapAuthenticationModeId != null &&
                     LdapAuthenticationModeId.Equals(other.LdapAuthenticationModeId)
                 ) &&
                 (
                     RoleIds == other.RoleIds ||
                     RoleIds != null &&
                     other.RoleIds != null &&
                     RoleIds.SequenceEqual(other.RoleIds)
                 ) &&
                 (
                     TeamIds == other.TeamIds ||
                     TeamIds != null &&
                     other.TeamIds != null &&
                     TeamIds.SequenceEqual(other.TeamIds)
                 ));
        }
コード例 #29
0
        /// <summary>
        /// Returns true if SecurityContractDefaultConfigurationUser instances are equal
        /// </summary>
        /// <param name="other">Instance of SecurityContractDefaultConfigurationUser to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SecurityContractDefaultConfigurationUser other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Uuid == other.Uuid ||
                     Uuid != null &&
                     Uuid.Equals(other.Uuid)
                     ) &&
                 (
                     Username == other.Username ||
                     Username != null &&
                     Username.Equals(other.Username)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                 ) &&
                 (
                     PhoneNumber == other.PhoneNumber ||
                     PhoneNumber != null &&
                     PhoneNumber.Equals(other.PhoneNumber)
                 ) &&
                 (
                     Password == other.Password ||
                     Password != null &&
                     Password.Equals(other.Password)
                 ) &&
                 (
                     HashedPassword == other.HashedPassword ||
                     HashedPassword != null &&
                     HashedPassword.Equals(other.HashedPassword)
                 ) &&
                 (
                     IsDeleted == other.IsDeleted ||

                     IsDeleted.Equals(other.IsDeleted)
                 ) &&
                 (
                     DeletedTime == other.DeletedTime ||
                     DeletedTime != null &&
                     DeletedTime.Equals(other.DeletedTime)
                 ) &&
                 (
                     Avatar == other.Avatar ||
                     Avatar != null &&
                     Avatar.Equals(other.Avatar)
                 ) &&
                 (
                     LdapAuthenticationMode == other.LdapAuthenticationMode ||
                     LdapAuthenticationMode != null &&
                     LdapAuthenticationMode.Equals(other.LdapAuthenticationMode)
                 ) &&
                 (
                     Roles == other.Roles ||
                     Roles != null &&
                     other.Roles != null &&
                     Roles.SequenceEqual(other.Roles)
                 ));
        }
コード例 #30
0
        /// <summary>
        /// Returns true if Debtor instances are equal
        /// </summary>
        /// <param name="other">Instance of Debtor to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Debtor other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AdditionalAddressInfo == other.AdditionalAddressInfo ||
                     AdditionalAddressInfo != null &&
                     AdditionalAddressInfo.Equals(other.AdditionalAddressInfo)
                     ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     CountryCode == other.CountryCode ||
                     CountryCode != null &&
                     CountryCode.Equals(other.CountryCode)
                 ) &&
                 (
                     FirstName == other.FirstName ||
                     FirstName != null &&
                     FirstName.Equals(other.FirstName)
                 ) &&
                 (
                     HouseNumber == other.HouseNumber ||
                     HouseNumber != null &&
                     HouseNumber.Equals(other.HouseNumber)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ) &&
                 (
                     StateCode == other.StateCode ||
                     StateCode != null &&
                     StateCode.Equals(other.StateCode)
                 ) &&
                 (
                     Street == other.Street ||
                     Street != null &&
                     Street.Equals(other.Street)
                 ) &&
                 (
                     Surname == other.Surname ||
                     Surname != null &&
                     Surname.Equals(other.Surname)
                 ) &&
                 (
                     SurnamePrefix == other.SurnamePrefix ||
                     SurnamePrefix != null &&
                     SurnamePrefix.Equals(other.SurnamePrefix)
                 ) &&
                 (
                     Zip == other.Zip ||
                     Zip != null &&
                     Zip.Equals(other.Zip)
                 ));
        }