/// <summary> /// Returns true if TesExecutor instances are equal /// </summary> /// <param name="other">Instance of TesExecutor to be compared</param> /// <returns>Boolean</returns> public bool Equals(TesExecutor other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Image == other.Image || Image != null && Image.Equals(other.Image) ) && ( Command == other.Command || Command != null && Command.SequenceEqual(other.Command) ) && ( Workdir == other.Workdir || Workdir != null && Workdir.Equals(other.Workdir) ) && ( Stdin == other.Stdin || Stdin != null && Stdin.Equals(other.Stdin) ) && ( Stdout == other.Stdout || Stdout != null && Stdout.Equals(other.Stdout) ) && ( Stderr == other.Stderr || Stderr != null && Stderr.Equals(other.Stderr) ) && ( Env == other.Env || Env != null && Env.SequenceEqual(other.Env) )); }
protected virtual bool ValidateInput() { string t = View.InputText.Trim(); if (t.IndexOf('/') != -1) { return(false); } if (!string.IsNullOrEmpty(t)) { Path file = PathFactory.createPath(Session, Workdir.getAbsolute(), t, AbstractPath.FILE_TYPE); return(!file.exists()); } return(false); }
/// <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 (Image != null) { hashCode = hashCode * 59 + Image.GetHashCode(); } if (Command != null) { hashCode = hashCode * 59 + Command.GetHashCode(); } if (Workdir != null) { hashCode = hashCode * 59 + Workdir.GetHashCode(); } if (Stdin != null) { hashCode = hashCode * 59 + Stdin.GetHashCode(); } if (Stdout != null) { hashCode = hashCode * 59 + Stdout.GetHashCode(); } if (Stderr != null) { hashCode = hashCode * 59 + Stderr.GetHashCode(); } if (Env != null) { hashCode = hashCode * 59 + Env.GetHashCode(); } return(hashCode); } }