Esempio n. 1
0
 public override int GetHashCode()
 {
     return(
         PageNumber.GetHashCode() ^
         PageSize.GetHashCode() ^
         RecordCount.GetHashCode() ^
         IsFirstPage.GetHashCode() ^
         IsLastPage.GetHashCode()
         );
 }
Esempio n. 2
0
        /// <summary>
        /// Sirve como la función hash predeterminada.
        /// </summary>
        /// <returns>Código hash para el objeto actual.</returns>
        public override int GetHashCode()
        {
            int hash  = 17; // Un número primo
            int prime = 31; // Otro número primo.

            hash = hash * prime + MetadataItemName.GetHashCode();
            hash = hash * prime + PdfPageN.GetHashCode();
            hash = hash * prime + IsLastPage.GetHashCode();
            hash = hash * prime + ((PdfRectangle == null) ? 0 : PdfRectangle.GetHashCode());
            hash = hash * prime + (RegexPattern ?? "").GetHashCode();
            hash = hash * prime + Position.GetHashCode();
            hash = hash * prime + (SourceTypeName ?? "").GetHashCode();
            hash = hash * prime + ((FillColor == null) ? 0 : FillColor.GetHashCode());
            hash = hash * prime + ((StrokeColor == null) ? 0 : StrokeColor.GetHashCode());
            hash = hash * prime + ((FontName == null) ? 0 : FontName.GetHashCode());
            hash = hash * prime + ((FontSize == null) ? 0 : FontSize.GetHashCode());


            return(hash);
        }