Exemplo n.º 1
0
        private ShellCommandTarget(IMenuCommandService commandService, IOmniBoxUIService omniBoxBroker)
        {
            this.InvokeSearchCommand = new MenuCommand(this.OnInvokeSearchCommand, InvokeSearchCommandId);
            commandService.AddCommand(this.InvokeSearchCommand);

            this.omniBoxBroker = (OmniBoxBroker)omniBoxBroker;
        }
Exemplo n.º 2
0
        public EditorCommandTarget(IVsTextView textViewAdapter, OmniBoxBroker omniBoxBroker)
        {
            this.omniBoxBroker = omniBoxBroker
                                 ?? throw new ArgumentNullException(nameof(omniBoxBroker));

            if (textViewAdapter == null)
            {
                throw new ArgumentNullException(nameof(textViewAdapter));
            }

            textViewAdapter.AddCommandFilter(this, out this.next);
        }