Beispiel #1
0
 /// <summary>
 /// Initialize a new instance of <see cref="PrimeNumbersPrinter"/> class.
 /// </summary>
 /// <param name="settings">Settings info of printer.</param>
 public PrimeNumbersPrinter(PrintSettings settings)
 {
     if (settings == null)
     {
         throw new ArgumentException("Configuracion de impresión no peude ser un valor nulo.", nameof(settings));
     }
     this.Settings = settings;
 }
Beispiel #2
0
        /// <summary>
        /// Run refactor exercise.
        /// </summary>
        private static void RunRefactorized()
        {
            const int           PRIMES_NUMBER  = 1000;
            const int           LINE_NUMBERS   = 50;
            const int           COLUMNS_NUMBER = 4;
            PrintSettings       printSettings  = new PrintSettings(PRIMES_NUMBER, LINE_NUMBERS, COLUMNS_NUMBER);
            PrimeNumbersPrinter printer        = new PrimeNumbersPrinter(printSettings);

            printer.Print();
        }