/// <summary> /// Renders the instance as a JSON string. /// </summary> public override string ToString() { // Set [StdErrLines] and [StdOutLines] if necessary. if (!string.IsNullOrEmpty(StdErr)) { StdErrLines = StdErr.ToLines().ToList(); } else if (errors.Count > 0) { StdErrLines = errors; } if (!string.IsNullOrEmpty(StdOut)) { StdOutLines = StdOut.ToLines().ToList(); } else if (output.Count > 0) { StdOutLines = output; } return(NeonHelper.JsonSerialize(this, Formatting.Indented)); }