private async Task CodeEditorMenuItemCallbackAsync(object sender, EventArgs e) { var(filePath, selection) = await VisualStudioInteraction.GetCurrentFilenameAndSelectionAsync(ServiceProvider, CodeConversion.IsCSFileName, false); if (filePath != null && selection != null) { await ConvertDocumentAsync(filePath, selection.Value); } }
private async Task CodeEditorMenuItemCallbackAsync(CancellationToken cancellationToken) { var(filePath, selection) = await VisualStudioInteraction.GetCurrentFilenameAndSelectionAsync(ServiceProvider, CodeConversion.IsVBFileName, false); if (filePath != null && selection != null) { await ConvertDocumentAsync(filePath, selection.Value, cancellationToken); } }