using System; namespace Spectre.Console { /// /// Contains extension methods for . /// public static class TreeExtensions { /// /// Sets the tree style. /// /// The tree. /// The tree style. /// The same instance so that multiple calls can be chained. public static Tree Style(this Tree tree, Style? style) { if (tree is null) { throw new ArgumentNullException(nameof(tree)); } tree.Style = style; return tree; } /// /// Sets the tree guide line appearance. /// /// The tree. /// The tree guide lines to use. /// The same instance so that multiple calls can be chained. public static Tree Guide(this Tree tree, TreeGuide guide) { if (tree is null) { throw new ArgumentNullException(nameof(tree)); } tree.Guide = guide; return tree; } } }