3 implementations of IMenuCommandService
System.Windows.Forms.Design (2)
System\ComponentModel\Design\MenuCommandService.cs (1)
16public class MenuCommandService : IMenuCommandService, IDisposable
System\Windows\Forms\Design\Behavior\BehaviorService.MenuCommandHandler.cs (1)
10private class MenuCommandHandler : IMenuCommandService
System.Windows.Forms.Tests (1)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
191private class MenuCommandService : IMenuCommandService
122 references to IMenuCommandService
DesignSurfaceExt (4)
DesignSurfaceExt.cs (4)
333ServiceContainer.AddService(typeof(IMenuCommandService), new MenuCommandService(this)); 347IMenuCommandService ims = GetService(typeof(IMenuCommandService)) as IMenuCommandService;
Microsoft.VisualStudio.LanguageServices (12)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (2)
77var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false);
EditorConfigSettings\SettingsEditorPane.cs (3)
118if (this.TryGetService<IMenuCommandService>(_threadingContext.JoinableTaskFactory, out var menuCommandService)) 298private static void AddCommand(IMenuCommandService menuCommandService,
Interactive\VsInteractiveWindowPackage.cs (1)
45var menuCommandService = (OleMenuCommandService)await GetServiceAsync(typeof(IMenuCommandService)).ConfigureAwait(true);
RoslynPackage.cs (1)
279var menuCommandService = (OleMenuCommandService?)await GetServiceAsync(typeof(IMenuCommandService)).ConfigureAwait(true);
SyncNamespaces\SyncNamespacesCommandHandler.cs (2)
57var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false);
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (2)
68var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(_threadingContext.JoinableTaskFactory, throwOnFailure: false).ConfigureAwait(false);
Utilities\VisualStudioCommandHandlerHelpers.cs (1)
18IMenuCommandService menuCommandService,
netstandard (1)
netstandard.cs (1)
264[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.IMenuCommandService))]
Roslyn.VisualStudio.DiagnosticsWindow (3)
VisualStudioDiagnosticsWindowPackage.cs (3)
71var menuCommandService = (IMenuCommandService)await GetServiceAsync(typeof(IMenuCommandService)).ConfigureAwait(true);
System (1)
src\libraries\shims\System\ref\System.cs (1)
250[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.IMenuCommandService))]
System.Windows.Forms (3)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1758if (site.TryGetService(out IMenuCommandService? menuCommandService))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
19/// Specifically, it first looks for <see cref="IMenuCommandService"/>, then falls back to looking for
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
5190if (TotalProperties > 0 && TryGetService(out IMenuCommandService? menuCommandService))
System.Windows.Forms.Design (97)
System\ComponentModel\Design\ComponentDesigner.cs (1)
587=> GetService<IMenuCommandService>()?.ShowContextMenu(MenuCommands.SelectionMenu, x, y);
System\ComponentModel\Design\DesignerActionUI.cs (4)
56IMenuCommandService? menuCommandService = serviceProvider.GetService<IMenuCommandService>(); 130IMenuCommandService? mcs = _serviceProvider.GetService<IMenuCommandService>();
System\ComponentModel\Design\MenuCommandService.cs (7)
82if (((IMenuCommandService)this).FindCommand(commandId) is not null) 124if (!((IMenuCommandService)this).Verbs.Contains(verb)) 126((IMenuCommandService)this).Verbs.Add(verb); 413MenuCommand? cmd = ((IMenuCommandService)this).FindCommand(commandID); 432MenuCommand? cmd = ((IMenuCommandService)this).FindCommand(commandId); 521if (((IMenuCommandService)this).Verbs.Contains(verb)) 523((IMenuCommandService)this).Verbs.Remove(verb);
System\Windows\Forms\Design\BaseContextMenuStrip.cs (1)
156if (_serviceProvider.TryGetService(out IMenuCommandService? menuCommandService))
System\Windows\Forms\Design\Behavior\BehaviorService.cs (8)
81IMenuCommandService? menuCommandService = serviceProvider.GetService<IMenuCommandService>(); 86host.RemoveService<IMenuCommandService>(); 87host.AddService<IMenuCommandService>(menuCommandHandler); 170if (_serviceProvider.GetService(typeof(IMenuCommandService)) is MenuCommandHandler menuCommandHandler && 173IMenuCommandService oldMenuCommandService = menuCommandHandler.MenuService; 174host.RemoveService<IMenuCommandService>(); 539private MenuCommand? FindCommand(CommandID commandID, IMenuCommandService menuService)
System\Windows\Forms\Design\Behavior\BehaviorService.MenuCommandHandler.cs (10)
15public MenuCommandHandler(BehaviorService owner, IMenuCommandService menuService) 21public IMenuCommandService MenuService { get; } 23void IMenuCommandService.AddCommand(MenuCommand command) => MenuService.AddCommand(command); 25void IMenuCommandService.RemoveVerb(DesignerVerb verb) => MenuService.RemoveVerb(verb); 27void IMenuCommandService.RemoveCommand(MenuCommand command) => MenuService.RemoveCommand(command); 29MenuCommand? IMenuCommandService.FindCommand(CommandID commandID) 47bool IMenuCommandService.GlobalInvoke(CommandID commandID) => MenuService.GlobalInvoke(commandID); 49void IMenuCommandService.ShowContextMenu(CommandID menuID, int x, int y) 52void IMenuCommandService.AddVerb(DesignerVerb verb) => MenuService.AddVerb(verb); 54DesignerVerbCollection IMenuCommandService.Verbs => MenuService.Verbs;
System\Windows\Forms\Design\Behavior\DesignerActionKeyboardBehavior.cs (2)
11private readonly IMenuCommandService? _menuService; 21_menuService = serviceProvider.GetService<IMenuCommandService>();
System\Windows\Forms\Design\CommandSet.cs (5)
28private IMenuCommandService? _menuService; 207IMenuCommandService? menuService = MenuService; 234protected IMenuCommandService? MenuService => _menuService ??= GetService<IMenuCommandService>(); 2461if (TryGetService(out IMenuCommandService? menuSvc))
System\Windows\Forms\Design\ComponentTray.cs (9)
49private IMenuCommandService _menuCommandService; 99IMenuCommandService mcs = MenuService; 651IMenuCommandService mcs = MenuService; 879IMenuCommandService mcs = MenuService; 1662IMenuCommandService mcs = MenuService; 1683private IMenuCommandService MenuService 1687_menuCommandService ??= (IMenuCommandService)GetService(typeof(IMenuCommandService)); 2252IMenuCommandService mcs = _tray.MenuService;
System\Windows\Forms\Design\DocumentDesigner.cs (9)
186IMenuCommandService menuCommandService = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 969IMenuCommandService mcs = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 1366IMenuCommandService mcs = (IMenuCommandService)GetService(typeof(IMenuCommandService));
System\Windows\Forms\Design\ParentControlDesigner.cs (6)
1465IMenuCommandService ms = (IMenuCommandService)GetService(typeof(IMenuCommandService)); 1664IMenuCommandService ms = (IMenuCommandService)GetService(typeof(IMenuCommandService));
System\Windows\Forms\Design\PbrsForward.cs (3)
21private IMenuCommandService? _menuCommandSvc; 35private IMenuCommandService? MenuCommandService 41_menuCommandSvc = _sp.GetService<IMenuCommandService>();
System\Windows\Forms\Design\StandardCommandToolStripMenuItem.cs (3)
17private IMenuCommandService? _menuCommandService; 61public IMenuCommandService? MenuService 65if (_menuCommandService is null && _serviceProvider.TryGetService(out IMenuCommandService? menuCommandService))
System\Windows\Forms\Design\StatusCommandUI.cs (3)
17private IMenuCommandService? _menuService; 28private IMenuCommandService? MenuService => _menuService ??= _serviceProvider.GetService<IMenuCommandService>();
System\Windows\Forms\Design\TabOrder.cs (9)
112IMenuCommandService? mcs = (IMenuCommandService?)host.GetService(typeof(IMenuCommandService)); 158IMenuCommandService? mcs = (IMenuCommandService?)_host.GetService(typeof(IMenuCommandService)); 507IMenuCommandService? mcs = (IMenuCommandService?)_host.GetService(typeof(IMenuCommandService));
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (9)
19private IMenuCommandService _menuCommandService; 137private IMenuCommandService MenuService 145_menuCommandService = (IMenuCommandService)_provider.GetService(typeof(IMenuCommandService)); 261IMenuCommandService mcs = MenuService; 547IMenuCommandService mcs = MenuService; 1473IMenuCommandService mcs = MenuService; 1551IMenuCommandService mcs = MenuService; 1607IMenuCommandService mcs = MenuService;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
434if (TryGetService(out IMenuCommandService? menuCommandService)) 451if (TryGetService(out IMenuCommandService? menuCommandService))
System\Windows\Forms\Design\ToolStripTemplateNode.cs (6)
177IMenuCommandService menuService = (IMenuCommandService)_component.Site.GetService(typeof(IMenuCommandService)); 212IMenuCommandService menuService = (IMenuCommandService)_component.Site.GetService(typeof(IMenuCommandService));
System.Windows.Forms.Tests (1)
System\Windows\Forms\AccessibleObjects\PropertyGrid.PropertyGridAccessibleObjectTests.cs (1)
220return serviceType == typeof(IMenuCommandService) ? new MenuCommandService() : null;