/// <summary> /// Adds current graph to VisualResult. If currentResult == null, throws ArgumentNullException. /// </summary> /// <returns></returns> public VisualResultBuilder AddGraphToResult() { if (currentResult == null) { throw new ArgumentNullException("Graph is not initialized. Cannot add null value as visual result."); } else { visualResult.Graphs.Add(currentResult); currentResult = null; return this; } }
public VisualResultBuilder NewGraph(string title = "") { currentResult = new VisualResultItem(); currentResult.Title = title; return this; }
/// <summary> /// Sets given graph as current graph. /// </summary> /// <param name="result">Given graph.</param> /// <returns></returns> public VisualResultBuilder SetCurrentResult(VisualResultItem result) { currentResult = result; return this; }