예제 #1
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 (LinkedNodeId != null)
         {
             hashCode = hashCode * 59 + LinkedNodeId.GetHashCode();
         }
         if (FixedConfig != null)
         {
             hashCode = hashCode * 59 + FixedConfig.GetHashCode();
         }
         if (ComponentSubGraph != null)
         {
             hashCode = hashCode * 59 + ComponentSubGraph.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #2
0
        /// <summary>
        /// Returns true if ModelFlowChartNodeComponent instances are equal
        /// </summary>
        /// <param name="other">Instance of ModelFlowChartNodeComponent to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ModelFlowChartNodeComponent other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     LinkedNodeId == other.LinkedNodeId ||
                     LinkedNodeId != null &&
                     LinkedNodeId.Equals(other.LinkedNodeId)
                 ) &&
                 (
                     FixedConfig == other.FixedConfig ||
                     FixedConfig != null &&
                     FixedConfig.Equals(other.FixedConfig)
                 ) &&
                 (
                     ComponentSubGraph == other.ComponentSubGraph ||
                     ComponentSubGraph != null &&
                     ComponentSubGraph.Equals(other.ComponentSubGraph)
                 ));
        }
 /// <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 (FixedConfig != null)
         {
             hashCode = hashCode * 59 + FixedConfig.GetHashCode();
         }
         if (InstallScript != null)
         {
             hashCode = hashCode * 59 + InstallScript.GetHashCode();
         }
         if (StartScript != null)
         {
             hashCode = hashCode * 59 + StartScript.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if ModelFlowChartEdge instances are equal
        /// </summary>
        /// <param name="other">Instance of ModelFlowChartEdge to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ModelFlowChartEdge other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     FixedConfig == other.FixedConfig ||
                     FixedConfig != null &&
                     FixedConfig.Equals(other.FixedConfig)
                 ) &&
                 (
                     LinkedNodes == other.LinkedNodes ||
                     LinkedNodes != null &&
                     LinkedNodes.SequenceEqual(other.LinkedNodes)
                 ) &&
                 (
                     Scripts == other.Scripts ||
                     Scripts != null &&
                     Scripts.Equals(other.Scripts)
                 ));
        }
        /// <summary>
        /// Returns true if ModelFlowChartExtension instances are equal
        /// </summary>
        /// <param name="other">Instance of ModelFlowChartExtension to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ModelFlowChartExtension other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     FixedConfig == other.FixedConfig ||
                     FixedConfig != null &&
                     FixedConfig.Equals(other.FixedConfig)
                 ) &&
                 (
                     InstallScript == other.InstallScript ||
                     InstallScript != null &&
                     InstallScript.Equals(other.InstallScript)
                 ) &&
                 (
                     StartScript == other.StartScript ||
                     StartScript != null &&
                     StartScript.Equals(other.StartScript)
                 ));
        }