private async Task ProjectItemMenuItem_BeforeQueryStatusAsync(object sender, EventArgs e) { if (sender is OleMenuCommand menuItem) { var itemsPath = await VisualStudioInteraction.GetSelectedItemsPathAsync(CodeConversion.IsVBFileName); menuItem.Visible = menuItem.Enabled = itemsPath.Count != 0; } }
private async Task ProjectItemMenuItemCallbackAsync(CancellationToken cancellationToken) { var itemsPath = await VisualStudioInteraction.GetSelectedItemsPathAsync(CodeConversion.IsVBFileName); await ConvertDocumentsAsync(itemsPath, cancellationToken); }