private void WriteCsv() { try { using (var writer = new StreamWriter(_currentFilePath, false, _host.Encoding)) { _host.Write(writer, CsvRows); } } catch (Exception e) { ErrorMessages.Add(e.ToString()); } }
private void WriteCsv() { var saveFileService = _viewService.SaveFileSelectionService; var fileName = saveFileService.SelectFile("Save As..", CsvFileFilter, _currentFilePath); if (fileName == null) { return; } try { using (var writer = new StreamWriter(fileName, false, _host.Encoding)) { _host.Write(writer, CsvRows); } } catch (Exception e) { ErrorMessages.Add(e.ToString()); } }