コード例 #1
0
 /// <summary>
 /// Initialzies a new instance of the RepeatedColorConsoleStyle class.
 /// </summary>
 /// <param name="foregroundConsoleColor">The foreground console color.</param>
 /// <param name="foregroundRgbColor">The foreground RGB color.</param>
 /// <param name="backgroundConsoleColors">The background console colors.</param>
 /// <param name="backgroundRgbColors">The background RGB colors.</param>
 public RepeatedColorConsoleStyle(ConsoleColor foregroundConsoleColor, Color foregroundRgbColor, IEnumerable <ConsoleColor> backgroundConsoleColors, IEnumerable <Color> backgroundRgbColors)
 {
     ForegroundConsoleColors.Add(foregroundConsoleColor);
     ForegroundRgbColors.Add(foregroundRgbColor);
     if (backgroundConsoleColors != null)
     {
         BackgroundConsoleColors.AddRange(backgroundConsoleColors);
     }
     if (backgroundRgbColors != null)
     {
         BackgroundRgbColors.AddRange(backgroundRgbColors);
     }
 }