/// <summary> /// Initialzies a new instance of the RepeatedColorConsoleStyle class. /// </summary> /// <param name="foregroundConsoleColors">The foreground console colors.</param> /// <param name="foregroundRgbColors">The foreground RGB colors.</param> public RepeatedColorConsoleStyle(IEnumerable <ConsoleColor> foregroundConsoleColors, IEnumerable <Color> foregroundRgbColors) { if (foregroundConsoleColors != null) { ForegroundConsoleColors.AddRange(foregroundConsoleColors); } if (foregroundRgbColors != null) { ForegroundRgbColors.AddRange(foregroundRgbColors); } }
/// <summary> /// Initialzies a new instance of the RepeatedColorConsoleStyle class. /// </summary> /// <param name="foregroundConsoleColors">The foreground console colors.</param> /// <param name="foregroundRgbColors">The foreground RGB colors.</param> /// <param name="backgroundConsoleColor">The background console colors.</param> /// <param name="backgroundRgbColor">The background RGB colors.</param> public RepeatedColorConsoleStyle(IEnumerable <ConsoleColor> foregroundConsoleColors, IEnumerable <Color> foregroundRgbColors, ConsoleColor?backgroundConsoleColor, Color?backgroundRgbColor) { if (foregroundConsoleColors != null) { ForegroundConsoleColors.AddRange(foregroundConsoleColors); } if (foregroundRgbColors != null) { ForegroundRgbColors.AddRange(foregroundRgbColors); } if (backgroundConsoleColor.HasValue) { BackgroundConsoleColors.Add(backgroundConsoleColor.Value); } if (backgroundRgbColor.HasValue) { BackgroundRgbColors.Add(backgroundRgbColor.Value); } }