using System; namespace Spectre.Console { /// /// Contains extension methods for . /// public static class RuleExtensions { /// /// Sets the rule title. /// /// The rule. /// The title. /// The same instance so that multiple calls can be chained. public static Rule RuleTitle(this Rule rule, string title) { if (rule is null) { throw new ArgumentNullException(nameof(rule)); } if (title is null) { throw new ArgumentNullException(nameof(title)); } rule.Title = title; return rule; } /// /// Sets the rule style. /// /// The rule. /// The rule style. /// The same instance so that multiple calls can be chained. public static Rule RuleStyle(this Rule rule, Style style) { if (rule is null) { throw new ArgumentNullException(nameof(rule)); } if (style is null) { throw new ArgumentNullException(nameof(style)); } rule.Style = style; return rule; } } }