Ejemplo n.º 1
0
 private static void PrintEmployee(Employee employee, FormatDimensions formatDimensions)
 {
     Console.WriteLine(formatDimensions.ToFormatString(),
         employee.FullName,
         employee.Position,
         employee.SeparationDateToString);
 }
Ejemplo n.º 2
0
        private static void PrintResult(IEnumerable<Employee> employees)
        {
            var formatDimensions = new FormatDimensions(employees);

            PrintHeader(formatDimensions);
            foreach (var employee in employees)
            {
                PrintEmployee(employee, formatDimensions);
            }
        }
Ejemplo n.º 3
0
 private static void PrintHeader(FormatDimensions formatDimensions)
 {
     Console.WriteLine(formatDimensions.ToFormatString(), "Name", "Position", "Separation Date");
     Console.WriteLine(String.Empty.PadRight(formatDimensions.TotalWidth(), '-'));
 }