Exemple #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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (InputPosition != null)
         {
             hashCode = hashCode * 59 + InputPosition.GetHashCode();
         }
         if (OutputPosition != null)
         {
             hashCode = hashCode * 59 + OutputPosition.GetHashCode();
         }
         if (Zone != null)
         {
             hashCode = hashCode * 59 + Zone.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #2
0
        public void Present()
        {
            OutputPosition pos     = OutputPosition.WFS_CDM_POSNULL;
            int            hResult = XfsApi.WFSAsyncExecute(hService, CDMDefinition.WFS_CMD_CDM_PRESENT, new IntPtr(&pos), 0, Handle, ref requestID);

            if (hResult != XFSDefinition.WFS_SUCCESS)
            {
                OnPresetError(hResult);
            }
        }
Exemple #3
0
        /// <summary>
        /// Returns true if TemperatureZone instances are equal
        /// </summary>
        /// <param name="other">Instance of TemperatureZone to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(TemperatureZone other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     InputPosition == other.InputPosition ||
                     InputPosition != null &&
                     InputPosition.Equals(other.InputPosition)
                 ) &&
                 (
                     OutputPosition == other.OutputPosition ||
                     OutputPosition != null &&
                     OutputPosition.Equals(other.OutputPosition)
                 ) &&
                 (
                     Zone == other.Zone ||
                     Zone != null &&
                     Zone.Equals(other.Zone)
                 ));
        }