private int[] GetEventsCount(MidiFileFormat midiFileFormat, MidiFileSize midiFileSize)
        {
            var result = new List <int>();

            foreach (var midiFile in GetFiles(midiFileFormat, midiFileSize))
            {
                var events = midiFile.GetTrackChunks().SelectMany(c => c.Events).ToList();
                result.Add(events.Count);
            }

            return(result.ToArray());
        }
        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)
 {
     foreach (var filePath in Directory.GetFiles(Path.Combine(FilesPath, midiFileFormat.ToString(), midiFileSize.ToString())))
     {
         yield return(MidiFile.Read(filePath));
     }
 }
 protected static void Read(MidiFileFormat midiFileFormat, MidiFileSize midiFileSize)
 {
     GetFiles(midiFileFormat, midiFileSize).ToList();
 }
 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));
     }
 }
 protected static void Read(MidiFileFormat midiFileFormat, MidiFileSize midiFileSize, ReadingSettings settings)
 {
     GetFiles(midiFileFormat, midiFileSize, settings).ToList();
 }