private void SaveEventsToFile() { if (_appData.Events != null && _appData.Events.Count > 0) { var filePath = GetFilePath(); if (filePath != null) { MidiFileSerializer.Serialize(_appData.Events, filePath); } } }
private static void SaveEventsToFile(IEnumerable <MidiNote> notes, string filePath) { if (notes != null && notes.Count() > 0) { if (filePath != null) { using (var serializer = new MidiFileSerializer(filePath)) { serializer.Serialize(notes); } } } }
private void SaveEventsToFile() { if (this.appData.Events != null && this.appData.Events.Count > 0) { var filePath = GetFilePath(); if (filePath != null) { using (var serializer = new MidiFileSerializer(filePath)) { serializer.Serialize(this.appData.Events); } } } }