Esempio n. 1
0
        public override int GetHashCode()
        {
            int hashCode = 17; // we *know* we are using this in a dictionary, so pre-compute this

            hashCode = hashCode * 23 + Id.GetHashCode();
            hashCode = hashCode * 23 + (Fid == null ? 0 : Fid.GetHashCode());
            hashCode = hashCode * 23 + (EnableDate == null ? 0 : EnableDate.GetHashCode());
            hashCode = hashCode * 23 + (DisableDate == null ? 0 : DisableDate.GetHashCode());
            hashCode = hashCode * 23 + Dr.GetHashCode();
            hashCode = hashCode * 23 + Ts.GetHashCode();
            hashCode = hashCode * 23 + (CreateBy == null ? 0 : CreateBy.GetHashCode());
            hashCode = hashCode * 23 + (CreateDate == null ? 0 : CreateDate.GetHashCode());
            hashCode = hashCode * 23 + (CreateName == null ? 0 : CreateName.GetHashCode());
            hashCode = hashCode * 23 + (UpdateBy == null ? 0 : UpdateBy.GetHashCode());
            hashCode = hashCode * 23 + (UpdateDate == null ? 0 : UpdateDate.GetHashCode());
            hashCode = hashCode * 23 + (UpdateName == null ? 0 : UpdateName.GetHashCode());
            hashCode = hashCode * 23 + (TableName == null ? 0 : TableName.GetHashCode());
            hashCode = hashCode * 23 + (TableComment == null ? 0 : TableComment.GetHashCode());
            hashCode = hashCode * 23 + (TableMode == null ? 0 : TableMode.GetHashCode());
            hashCode = hashCode * 23 + (SubTable == null ? 0 : SubTable.GetHashCode());
            hashCode = hashCode * 23 + IsTree.GetHashCode();
            hashCode = hashCode * 23 + IsPagination.GetHashCode();
            hashCode = hashCode * 23 + IsSync.GetHashCode();

            return(hashCode);
        }
Esempio n. 2
0
 /// <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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (RoleName != null)
         {
             hashCode = hashCode * 59 + RoleName.GetHashCode();
         }
         if (CreateDate != null)
         {
             hashCode = hashCode * 59 + CreateDate.GetHashCode();
         }
         if (Identities != null)
         {
             hashCode = hashCode * 59 + Identities.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hashCode =
                IdVer.GetHashCode() +
                IdSubVer.GetHashCode() +
                Timestamp.GetHashCode() +
                (IdPrototype == null ? 0 : IdPrototype.GetHashCode()) +
                (IdItemBcn == null ? 0 : IdItemBcn.GetHashCode()) +
                (IdMatTypeL1 == null ? 0 : IdMatTypeL1.GetHashCode()) +
                (IdMatTypeL2 == null ? 0 : IdMatTypeL2.GetHashCode()) +
                (IdMatTypeL3 == null ? 0 : IdMatTypeL3.GetHashCode()) +
                (IdDefaultSupplier == null ? 0 : IdDefaultSupplier.GetHashCode()) +
                (IdModel == null ? 0 : IdModel.GetHashCode()) +
                (IdFamilyHK == null ? 0 : IdFamilyHK.GetHashCode()) +
                (IdColor1 == null ? 0 : IdColor1.GetHashCode()) +
                (IdColor2 == null ? 0 : IdColor2.GetHashCode()) +
                (IdItemHK == null ? 0 : IdItemHK.GetHashCode()) +
                (ItemDescription == null ? 0 : ItemDescription.GetHashCode()) +
                (Comments == null ? 0 : Comments.GetHashCode()) +
                (LaunchDate == null ? 0 : LaunchDate.GetHashCode()) +
                (RemovalDate == null ? 0 : RemovalDate.GetHashCode()) +
                IdStatusCial.GetHashCode() +
                IdStatusProd.GetHashCode() +
                (IdUserAttri1 == null ? 0 : IdUserAttri1.GetHashCode()) +
                (IdUserAttri2 == null ? 0 : IdUserAttri2.GetHashCode()) +
                (IdUserAttri3 == null ? 0 : IdUserAttri3.GetHashCode()) +
                (Unit == null ? 0 : Unit.GetHashCode()) +
                (DocsLink == null ? 0 : DocsLink.GetHashCode()) +
                CreateDate.GetHashCode() +
                (PhotoUrl == null ? 0 : PhotoUrl.GetHashCode()) +
                (User == null ? 0 : User.GetHashCode());

            return(hashCode);
        }
Esempio n. 4
0
        public override int GetHashCode()
        {
            const int NUM1 = 5404;
            const int NUM2 = 823;
            int       hash = NUM1;

            if (Name != null)
            {
                hash = (NUM2 * hash) + Name.GetHashCode();
            }
            hash = (NUM2 * hash) + CreateDate.GetHashCode();
            if (ActiveCredential != null)
            {
                hash = (NUM2 * hash) + ActiveCredential.GetHashCode();
            }
            if (CredentialHistory != null)
            {
                foreach (Credential cred in CredentialHistory)
                {
                    hash = (NUM2 * hash) + cred.GetHashCode();
                }
            }
            if (Notes != null)
            {
                hash = (NUM2 * hash) + Notes.GetHashCode();
            }
            return(hash);
        }
Esempio n. 5
0
        public override int GetHashCode()
        {
            var hashCode = -1294847358;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <Account> .Default.GetHashCode(Account);

            hashCode = hashCode * -1521134295 + CreateDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <DateTime?> .Default.GetHashCode(LastModification);

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

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

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

            hashCode = hashCode * -1521134295 + EqualityComparer <List <Paragraph> > .Default.GetHashCode(Paragraphs);

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

            hashCode = hashCode * -1521134295 + IsVisible.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <ContentCategory> .Default.GetHashCode(ContentCategory);

            hashCode = hashCode * -1521134295 + EqualityComparer <Account> .Default.GetHashCode(LastModifiedBy);

            return(hashCode);
        }
Esempio n. 6
0
        public override int GetHashCode()
        {
            int hash = 17;

            hash = hash * 31 + (Id == null ? 0 : Id.GetHashCode());
            hash = hash * 31 + (Author == null ? 0 : Author.GetHashCode());
            hash = hash * 31 + (Kind == null ? 0 : Kind.GetHashCode());
            hash = hash * 31 + (CreateDate == null ? 0 : CreateDate.GetHashCode());
            hash = hash * 31 + IsDeleted.GetHashCode();
            return(hash);
        }
Esempio n. 7
0
        public override int GetHashCode()
        {
            if (fHashCode == 0)
            {
                fHashCode = base.GetHashCode();
                fHashCode = fHashCode * 37 + CreateDate.GetHashCode();
                fHashCode = fHashCode * 19 + AssociatedEntitiesCount;
            }

            return(fHashCode);
        }
Esempio n. 8
0
        public override int GetHashCode()
        {
            int hashCode = 17; // we *know* we are using this in a dictionary, so pre-compute this

            hashCode = hashCode * 23 + Id.GetHashCode();
            hashCode = hashCode * 23 + (Fid == null ? 0 : Fid.GetHashCode());
            hashCode = hashCode * 23 + (EnableDate == null ? 0 : EnableDate.GetHashCode());
            hashCode = hashCode * 23 + (DisableDate == null ? 0 : DisableDate.GetHashCode());
            hashCode = hashCode * 23 + Dr.GetHashCode();
            hashCode = hashCode * 23 + Ts.GetHashCode();
            hashCode = hashCode * 23 + (CreateBy == null ? 0 : CreateBy.GetHashCode());
            hashCode = hashCode * 23 + (CreateDate == null ? 0 : CreateDate.GetHashCode());
            hashCode = hashCode * 23 + (CreateName == null ? 0 : CreateName.GetHashCode());
            hashCode = hashCode * 23 + (UpdateBy == null ? 0 : UpdateBy.GetHashCode());
            hashCode = hashCode * 23 + (UpdateDate == null ? 0 : UpdateDate.GetHashCode());
            hashCode = hashCode * 23 + (UpdateName == null ? 0 : UpdateName.GetHashCode());
            hashCode = hashCode * 23 + (TableName == null ? 0 : TableName.GetHashCode());
            hashCode = hashCode * 23 + (ColName == null ? 0 : ColName.GetHashCode());
            hashCode = hashCode * 23 + (ColComment == null ? 0 : ColComment.GetHashCode());
            hashCode = hashCode * 23 + (ColDefault == null ? 0 : ColDefault.GetHashCode());
            hashCode = hashCode * 23 + (ColType == null ? 0 : ColType.GetHashCode());
            hashCode = hashCode * 23 + ColProperty.GetHashCode();
            hashCode = hashCode * 23 + ColLength.GetHashCode();
            hashCode = hashCode * 23 + DisplayWidth.GetHashCode();
            hashCode = hashCode * 23 + ColOrder.GetHashCode();
            hashCode = hashCode * 23 + ColPrecision.GetHashCode();
            hashCode = hashCode * 23 + NullAble.GetHashCode();
            hashCode = hashCode * 23 + ShowAble.GetHashCode();
            hashCode = hashCode * 23 + IsDefaultCol.GetHashCode();
            hashCode = hashCode * 23 + (CtrlType == null ? 0 : CtrlType.GetHashCode());
            hashCode = hashCode * 23 + (RefTable == null ? 0 : RefTable.GetHashCode());
            hashCode = hashCode * 23 + (RefID == null ? 0 : RefID.GetHashCode());
            hashCode = hashCode * 23 + (RefCode == null ? 0 : RefCode.GetHashCode());
            hashCode = hashCode * 23 + (RefName == null ? 0 : RefName.GetHashCode());
            hashCode = hashCode * 23 + (RefCondition == null ? 0 : RefCondition.GetHashCode());
            hashCode = hashCode * 23 + (RefCols == null ? 0 : RefCols.GetHashCode());
            hashCode = hashCode * 23 + (RefType == null ? 0 : RefType.GetHashCode());
            hashCode = hashCode * 23 + (MainTable == null ? 0 : RefType.GetHashCode());
            hashCode = hashCode * 23 + (MainTableCol == null ? 0 : MainTableCol.GetHashCode());
            hashCode = hashCode * 23 + (CalculationExpr == null ? 0 : CalculationExpr.GetHashCode());
            return(hashCode);
        }
Esempio n. 9
0
        public override int GetHashCode()
        {
            int result = 1;

            result = (result * 397) ^ (ProjCode != null ? ProjCode.GetHashCode() : 0);
            result = (result * 397) ^ (ProjDateend != null ? ProjDateend.GetHashCode() : 0);
            result = (result * 397) ^ (ProjDatestart != null ? ProjDatestart.GetHashCode() : 0);
            result = (result * 397) ^ (ProjDepartment != null ? ProjDepartment.GetHashCode() : 0);
            result = (result * 397) ^ (ProjEname != null ? ProjEname.GetHashCode() : 0);
            result = (result * 397) ^ (ProjExtent != null ? ProjExtent.GetHashCode() : 0);
            result = (result * 397) ^ (Id != null ? Id.GetHashCode() : 0);
            result = (result * 397) ^ (ProjTname != null ? ProjTname.GetHashCode() : 0);
            result = (result * 397) ^ (ProjValue != null ? ProjValue.GetHashCode() : 0);
            result = (result * 397) ^ (ProjYear != null ? ProjYear.GetHashCode() : 0);
            result = (result * 397) ^ (InctNum != null ? InctNum.GetHashCode() : 0);
            result = (result * 397) ^ (CreateBy != null ? CreateBy.GetHashCode() : 0);
            result = (result * 397) ^ (CreateDate != null ? CreateDate.GetHashCode() : 0);
            result = (result * 397) ^ (UpdateBy != null ? UpdateBy.GetHashCode() : 0);
            result = (result * 397) ^ (UpdateDate != null ? UpdateDate.GetHashCode() : 0);
            return(result);
        }
Esempio n. 10
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (InstrumentId.Length != 0)
            {
                hash ^= InstrumentId.GetHashCode();
            }
            if (ExchangeId.Length != 0)
            {
                hash ^= ExchangeId.GetHashCode();
            }
            if (InstrumentName.Length != 0)
            {
                hash ^= InstrumentName.GetHashCode();
            }
            if (ProductId.Length != 0)
            {
                hash ^= ProductId.GetHashCode();
            }
            if (ProductClass != 0)
            {
                hash ^= ProductClass.GetHashCode();
            }
            if (DeliveryYear != 0)
            {
                hash ^= DeliveryYear.GetHashCode();
            }
            if (DeliveryMonth != 0)
            {
                hash ^= DeliveryMonth.GetHashCode();
            }
            if (MaxMarketOrderVolume != 0)
            {
                hash ^= MaxMarketOrderVolume.GetHashCode();
            }
            if (MinMarketOrderVolume != 0)
            {
                hash ^= MinMarketOrderVolume.GetHashCode();
            }
            if (MaxLimitOrderVolume != 0)
            {
                hash ^= MaxLimitOrderVolume.GetHashCode();
            }
            if (MinLimitOrderVolume != 0)
            {
                hash ^= MinLimitOrderVolume.GetHashCode();
            }
            if (VolumeMultiple != 0)
            {
                hash ^= VolumeMultiple.GetHashCode();
            }
            if (PriceTick != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PriceTick);
            }
            if (CreateDate.Length != 0)
            {
                hash ^= CreateDate.GetHashCode();
            }
            if (OpenDate.Length != 0)
            {
                hash ^= OpenDate.GetHashCode();
            }
            if (ExpireDate.Length != 0)
            {
                hash ^= ExpireDate.GetHashCode();
            }
            if (StartDelivDate.Length != 0)
            {
                hash ^= StartDelivDate.GetHashCode();
            }
            if (EndDelivDate.Length != 0)
            {
                hash ^= EndDelivDate.GetHashCode();
            }
            if (IsTrading != false)
            {
                hash ^= IsTrading.GetHashCode();
            }
            if (UnderlyingMultiple != 0)
            {
                hash ^= UnderlyingMultiple.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }