static private void SortAndPrint(IRecordPrinter<string> printer, IRecordSorter sorter, IEnumerable<Record> records) { Console.WriteLine("Sorting with {0}", sorter); foreach (var record in sorter.Sort(records)) { Console.WriteLine(printer.PrintRecord(record)); } }
/// <summary> /// Initializes a new instance of the <see cref="SelectComanndHandler"/> class. /// </summary> /// <param name="service">The service.</param> /// <param name="printer">The printer.</param> public SelectComanndHandler(IFileCabinetService service, IRecordPrinter printer) : base(service) { this.printer = printer; }