private async Task ConvertDocumentAsync(string documentPath, Span selected, CancellationToken cancellationToken) { if (documentPath == null || !CodeConversion.IsVBFileName(documentPath)) { return; } try { await _codeConversion.ConvertDocumentAsync <VBToCSConversion>(documentPath, selected, cancellationToken); } catch (Exception ex) { await _package.ShowExceptionAsync(ex); } }
private async Task ConvertDocumentAsync(string documentPath, Span selected, CancellationToken cancellationToken) { if (documentPath == null || !CodeConversion.IsCSFileName(documentPath)) { return; } try { await _codeConversion.ConvertDocumentAsync <CSToVBConversion>(documentPath, selected, cancellationToken); } catch (Exception ex) { await VisualStudioInteraction.ShowExceptionAsync(ex); } }
private async Task ConvertDocumentAsync(string documentPath, Span selected, CancellationToken cancellationToken) { if (documentPath == null || !CodeConversion.IsVBFileName(documentPath)) { return; } try { await _codeConversion.ConvertDocumentAsync <VBToCSConversion>(documentPath, selected, cancellationToken); } catch (Exception ex) { await VisualStudioInteraction.ShowExceptionAsync(ServiceProvider, CodeConversion.ConverterTitle, ex); } }