private static IEnumerable <MidiFile> GetFiles(MidiFileFormat midiFileFormat, MidiFileSize midiFileSize) { foreach (var filePath in Directory.GetFiles(Path.Combine(FilesPath, midiFileFormat.ToString(), midiFileSize.ToString()))) { yield return(MidiFile.Read(filePath)); } }
protected static Dictionary <MidiFile, string> GetFiles(MidiFileFormat midiFileFormat, MidiFileSize midiFileSize) { var result = new Dictionary <MidiFile, string>(); foreach (var filePath in Directory.GetFiles(Path.Combine(FilesPath, midiFileFormat.ToString(), midiFileSize.ToString()))) { var midiFile = MidiFile.Read(filePath); var newFilePath = Path.GetTempFileName(); result.Add(midiFile, newFilePath); } return(result); }
private static IEnumerable <MidiFile> GetFiles(MidiFileFormat midiFileFormat, MidiFileSize midiFileSize, ReadingSettings settings) { foreach (var filePath in Directory.GetFiles(Path.Combine(TestFilesProvider.ValidFilesPath, midiFileFormat.ToString(), midiFileSize.ToString()))) { yield return(MidiFile.Read(filePath, settings)); } }