public Algorithm(AlgorithmType algorithmType, string fileName) { FileName = fileName; switch (algorithmType) { case AlgorithmType.Insertion: { SortAlgoritm = new InsertionSort(tempDirectory); break; } case AlgorithmType.Merge: { SortAlgoritm = new MergeSort(tempDirectory); break; } default: throw new ArgumentException($"unknown algorithm {algorithmType}"); } }
public Sorter(ISortAlgoritm sortAlgoritm) { _sortAlgoritm = sortAlgoritm; }