コード例 #1
0
        public override int GetHashCode()
        {
            int code = 27;

            code = unchecked (
                code ^
                EmployeeID.GetHashCode() ^
                FirstName.GetHashCode() ^
                Title.GetHashCode() ^
                TitleOfCourtesy.GetHashCode() ^
                BirthDate.GetHashCode() ^
                HireDate.GetHashCode() ^
                Address.GetHashCode() ^
                City.GetHashCode() ^
                Region.GetHashCode() ^
                PostalCode.GetHashCode() ^
                Country.GetHashCode() ^
                HomePhone.GetHashCode() ^
                Extension.GetHashCode() ^
                Photo.GetHashCode() ^
                Notes.GetHashCode() ^
                ReportsTo.GetHashCode() ^
                PhotoPath.GetHashCode()
                );
            return(code);
        }
        public override int GetHashCode()
        {
            int hashCode = 13;

            hashCode = (hashCode * 7) + EmployeeID.GetHashCode();
            hashCode = (hashCode * 7) + TerritoryID.GetHashCode();
            return(hashCode);
        }
        //override hashcode
        public override int GetHashCode()
        {
            int hashCode = 1858374551;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FirstName);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(LastName);

            hashCode = hashCode * -1521134295 + EmployeeID.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Department);

            return(hashCode);
        }
コード例 #4
0
        public override int GetHashCode()
        {
            var hashCode = 84649274;

            hashCode = hashCode * -1521134295 + OrderID.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(CustomerID);

            hashCode = hashCode * -1521134295 + EmployeeID.GetHashCode();
            hashCode = hashCode * -1521134295 + OrderDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(RequiredDate);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ShippedDate);

            hashCode = hashCode * -1521134295 + ShipVia.GetHashCode();
            hashCode = hashCode * -1521134295 + Freight.GetHashCode();
            return(hashCode);
        }
コード例 #5
0
 public override int GetHashCode() => EmployeeID.GetHashCode();
コード例 #6
0
ファイル: Employee.cs プロジェクト: zcs0228/EntityFramework
 public override int GetHashCode()
 {
     return(EmployeeID.GetHashCode());
 }
コード例 #7
0
 public void GetHashCode_For0603000001_Passes()
 {
     Expect(employeeIDFixture0603000001.GetHashCode(), Is.EqualTo(employeeIDFixture0603000001.Clone().GetHashCode()));
 }
コード例 #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (OrderID != 0)
            {
                hash ^= OrderID.GetHashCode();
            }
            if (CustomerID.Length != 0)
            {
                hash ^= CustomerID.GetHashCode();
            }
            if (EmployeeID != 0)
            {
                hash ^= EmployeeID.GetHashCode();
            }
            if (orderDate_ != null)
            {
                hash ^= OrderDate.GetHashCode();
            }
            if (requiredDate_ != null)
            {
                hash ^= RequiredDate.GetHashCode();
            }
            if (shippedDate_ != null)
            {
                hash ^= ShippedDate.GetHashCode();
            }
            if (ShipVia != 0)
            {
                hash ^= ShipVia.GetHashCode();
            }
            if (Freight != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Freight);
            }
            if (ShipName.Length != 0)
            {
                hash ^= ShipName.GetHashCode();
            }
            if (ShipAddress.Length != 0)
            {
                hash ^= ShipAddress.GetHashCode();
            }
            if (ShipCity.Length != 0)
            {
                hash ^= ShipCity.GetHashCode();
            }
            if (ShipRegion.Length != 0)
            {
                hash ^= ShipRegion.GetHashCode();
            }
            if (ShipPostalCode.Length != 0)
            {
                hash ^= ShipPostalCode.GetHashCode();
            }
            if (ShipCountry.Length != 0)
            {
                hash ^= ShipCountry.GetHashCode();
            }
            hash ^= lines_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }