namespace Spectre.Console; /// /// Contains extension methods for . /// public static class LiveDisplayExtensions { /// /// Sets whether or not auto clear is enabled. /// If enabled, the live display will be cleared when done. /// /// The instance. /// Whether or not auto clear is enabled. /// The same instance so that multiple calls can be chained. public static LiveDisplay AutoClear(this LiveDisplay live, bool enabled) { if (live is null) { throw new ArgumentNullException(nameof(live)); } live.AutoClear = enabled; return live; } /// /// Sets the vertical overflow strategy. /// /// The instance. /// The overflow strategy to use. /// The same instance so that multiple calls can be chained. public static LiveDisplay Overflow(this LiveDisplay live, VerticalOverflow overflow) { if (live is null) { throw new ArgumentNullException(nameof(live)); } live.Overflow = overflow; return live; } /// /// Sets the vertical overflow cropping strategy. /// /// The instance. /// The overflow cropping strategy to use. /// The same instance so that multiple calls can be chained. public static LiveDisplay Cropping(this LiveDisplay live, VerticalOverflowCropping cropping) { if (live is null) { throw new ArgumentNullException(nameof(live)); } live.Cropping = cropping; return live; } }