Esempio n. 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Use.Length != 0)
            {
                hash ^= Use.GetHashCode();
            }
            if (Short.Length != 0)
            {
                hash ^= Short.GetHashCode();
            }
            if (Long.Length != 0)
            {
                hash ^= Long.GetHashCode();
            }
            if (Example.Length != 0)
            {
                hash ^= Example.GetHashCode();
            }
            if (Deprecated.Length != 0)
            {
                hash ^= Deprecated.GetHashCode();
            }
            if (Hidden != false)
            {
                hash ^= Hidden.GetHashCode();
            }
            return(hash);
        }
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 (Uuid != null)
         {
             hashCode = hashCode * 59 + Uuid.GetHashCode();
         }
         if (Use != null)
         {
             hashCode = hashCode * 59 + Use.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Line != null)
         {
             hashCode = hashCode * 59 + Line.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (District != null)
         {
             hashCode = hashCode * 59 + District.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (PostalCode != null)
         {
             hashCode = hashCode * 59 + PostalCode.GetHashCode();
         }
         if (Period != null)
         {
             hashCode = hashCode * 59 + Period.GetHashCode();
         }
         if (Creation != null)
         {
             hashCode = hashCode * 59 + Creation.GetHashCode();
         }
         if (LastUpdated != null)
         {
             hashCode = hashCode * 59 + LastUpdated.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 3
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = base.GetHashCode();
         result = (result * 397) ^ (int)Importance;
         result = (result * 397) ^ Use?.GetHashCode() ?? 0;
         result = (result * 397) ^ Bindings.GetUnsequencedHashCode();
         return(result);
     }
 }
Esempio n. 4
0
        /// <summary>
        /// Chart 설정 또는 변량에 대해 XML 속성으로 생성합니다.
        /// </summary>
        /// <param name="writer">xml writer</param>
        public override void GenerateXmlAttributes(System.Xml.XmlWriter writer)
        {
            base.GenerateXmlAttributes(writer);

            if (Use.HasValue)
            {
                writer.WriteAttributeString("Use" + AttrName, Use.GetHashCode().ToString());
            }
            if (WPercent.HasValue)
            {
                writer.WriteAttributeString(AttrName + "WPercent", WPercent.ToString());
            }
            if (HPercent.HasValue)
            {
                writer.WriteAttributeString(AttrName + "HPercent", HPercent.ToString());
            }
            if (ShowTitle.HasValue)
            {
                writer.WriteAttributeString(AttrName + "ShowTitle", ShowTitle.GetHashCode().ToString());
            }
            if (Title.IsNotWhiteSpace())
            {
                writer.WriteAttributeString(AttrName + "Title", Title);
            }
            if (Color.HasValue)
            {
                writer.WriteAttributeString(AttrName + "Color", Color.Value.ToHexString());
            }

            if (MessageGoesToLog.HasValue)
            {
                writer.WriteAttributeString("MessageGoesToLog", MessageGoesToLog.GetHashCode().ToString());
            }
            if (MessageGoesToJS.HasValue)
            {
                writer.WriteAttributeString("MessageGoesToJS", MessageGoesToJS.GetHashCode().ToString());
            }
            if (MessageJSHandler.IsNotWhiteSpace())
            {
                writer.WriteAttributeString("MessageJSHandler", MessageJSHandler);
            }
            if (MessagePassAllJS.HasValue)
            {
                writer.WriteAttributeString("MessagePassAllJS", MessagePassAllJS.GetHashCode().ToString());
            }
        }
 /// <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 (Uuid != null)
         {
             hashCode = hashCode * 59 + Uuid.GetHashCode();
         }
         if (System != null)
         {
             hashCode = hashCode * 59 + System.GetHashCode();
         }
         if (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         if (Use != null)
         {
             hashCode = hashCode * 59 + Use.GetHashCode();
         }
         if (Rank != null)
         {
             hashCode = hashCode * 59 + Rank.GetHashCode();
         }
         if (Period != null)
         {
             hashCode = hashCode * 59 + Period.GetHashCode();
         }
         if (Creation != null)
         {
             hashCode = hashCode * 59 + Creation.GetHashCode();
         }
         if (LastUpdated != null)
         {
             hashCode = hashCode * 59 + LastUpdated.GetHashCode();
         }
         return(hashCode);
     }
 }