private async void SolutionOrProjectMenuItemCallback(object sender, EventArgs e) { try { var projects = VisualStudioInteraction.GetSelectedProjects(ProjectExtension); await _codeConversion.PerformProjectConversion <VBToCSConversion>(projects); } catch (Exception ex) { VisualStudioInteraction.ShowException(ServiceProvider, CodeConversion.ConverterTitle, ex); } }
private async Task ConvertDocument(string documentPath, Span selected) { if (documentPath == null || !CodeConversion.IsCSFileName(documentPath)) { return; } try { await codeConversion.PerformDocumentConversion <CSToVBConversion>(documentPath, selected); } catch (Exception ex) { VisualStudioInteraction.ShowException(ServiceProvider, CodeConversion.ConverterTitle, ex); } }