private ToolVersion?GetVersion() { var process = CreateProcess(" --version"); process.Start(); process.WaitForExit(); return(ToolVersion.Parse(process.StandardOutput.ReadToEnd())); }
public override int GetHashCode() { unchecked { var hashCode = (ToolId != null ? ToolId.ToLower().GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ToolVersion != null ? ToolVersion.ToLower().GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FileName != null ? FileName.ToLower().GetHashCode() : 0); return(hashCode); } }
public override bool Execute() { try { if (!FindRustc()) { return(false); } var version = GetVersion(); if (!version.HasValue) { return(false); } rustcVersion = version.Value; return(ExecuteInner()); } catch (Exception ex) { this.Log.LogErrorFromException(ex, true); return(false); } }