public override int GetHashCode() { unchecked { int hashCode = (ToZone != null ? ToZone.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FromZone != null ? FromZone.GetHashCode() : 0); hashCode = (hashCode * 397) ^ FromPosition.GetHashCode(); hashCode = (hashCode * 397) ^ ToPosition.GetHashCode(); return(hashCode); } }
/// <summary> /// String representation of gcode line /// </summary> /// <returns></returns> public string ToString() { if (comment.Length > 0) { return("Comments:" + comment); } else { return("From:" + FromPosition.ToString() + " To:" + ToPosition.ToString() + "; Directory:" + this.xDir.ToString() + "," + this.yDir.ToString() + "," + this.zDir.ToString()); } }
public bool Equals(ZoneBoundary other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(ToZone == other.ToZone && FromZone == other.FromZone && FromPosition.Equals(other.FromPosition) && ToPosition.Equals(other.ToPosition)); }
public override string ToString() { return(string.Format("{0}->{1},{2}", FromPosition.ToString(), ToPosition.ToString(), (DoTransform ? "@" : "-"))); }