Beispiel #1
0
        public override int GetHashCode()
        {
            int result = ElementId != null?ElementId.GetHashCode() : 0;

            result = 31 * result + SectionType.GetHashCode();
            return(result);
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            int result = ElementId.GetHashCode();

            result = 31 * result + Type.GetHashCode();
            return(result);
        }
Beispiel #3
0
 /// <summary>
 /// Returns hash code for this object. For more information on this implementation see:
 /// Jon Skeet's answer on http://stackoverflow.com/questions/263400
 /// </summary>
 /// <returns>Hash code.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + ElementId.GetHashCode();
         hash = hash * 23 + ElementTypeId.GetHashCode();
         return(hash);
     }
 }
Beispiel #4
0
 public static Category ToCategory(this ElementId id, UIDocument uidoc)
 {
     foreach (Category category in uidoc.Document.Settings.Categories)
     {
         Category val = category;
         if (val.Id.GetHashCode() == id.GetHashCode())
         {
             return(val);
         }
     }
     return(null);
 }
Beispiel #5
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (ElementId != 0)
            {
                hash ^= ElementId.GetHashCode();
            }
            if (Num != 0)
            {
                hash ^= Num.GetHashCode();
            }
            return(hash);
        }
Beispiel #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Key.GetHashCode();
         hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ProcessInstanceKey.GetHashCode();
         hashCode = (hashCode * 397) ^ (BpmnProcessId != null ? BpmnProcessId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ProcessDefinitionVersion;
         hashCode = (hashCode * 397) ^ ProcessDefinitionKey.GetHashCode();
         hashCode = (hashCode * 397) ^ (ElementId != null ? ElementId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ElementInstanceKey.GetHashCode();
         hashCode = (hashCode * 397) ^ (Worker != null ? Worker.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Retries;
         hashCode = (hashCode * 397) ^ Deadline.GetHashCode();
         hashCode = (hashCode * 397) ^ (Variables != null ? Variables.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CustomHeaders != null ? CustomHeaders.GetHashCode() : 0);
         return(hashCode);
     }
 }
Beispiel #7
0
 /// <summary>
 /// Override method GetHashCode.
 /// </summary>
 /// <returns>
 /// The hash code.
 /// </returns>
 public override int GetHashCode()
 {
     return(m_FirstId.GetHashCode() ^ m_SecondId.GetHashCode());
 }