/// <summary> /// Pretty prints a <see cref="PrtgNode"/> to a specified writer. /// </summary> /// <param name="node">The root of the tree to print.</param> /// <param name="writer">A writer that will be used for displaying the resulting text.</param> public static void PrettyPrint(this PrtgNode node, PrettyWriter writer) { var visitor = new PrtgNodePrettyTreeVisitor(); node.Accept(visitor); writer.Execute(visitor.Result); }
/// <summary> /// Visits a single <see cref="PrtgNode"/>. /// </summary> /// <param name="node">The node to visit.</param> public virtual void Visit(PrtgNode node) => node.Accept(this);