void ICommandHandler <InvokeCompletionListCommandArgs> .ExecuteCommand(InvokeCompletionListCommandArgs args, Action nextHandler)
        {
            AssertIsForeground();

            // TODO(cyrusn): Should we ever call into nextHandler in this method?

            // First, always dismiss whatever session we might have already had.  We no longer need
            // it.
            if (sessionOpt != null)
            {
                this.StopModelComputation();
            }

            // Next create the session that represents that we now have a potential completion list.
            // Then tell it to start computing.
            var completionService = this.GetCompletionService();

            if (completionService == null)
            {
                return;
            }

            StartNewModelComputation(
                completionService, filterItems: false, dismissIfEmptyAllowed: false);
        }
        void ICommandHandler <InvokeCompletionListCommandArgs> .ExecuteCommand(InvokeCompletionListCommandArgs args, Action nextHandler)
        {
            AssertIsForeground();

            // TODO(cyrusn): Should we ever call into nextHandler in this method?

            // First, always dismiss whatever session we might have already had.  We no longer need
            // it.
            DismissSessionIfActive();

            // Next create the session that represents that we now have a potential completion list.
            // Then tell it to start computing.
            var completionService = this.GetCompletionService();

            if (completionService == null)
            {
                return;
            }

            var trigger = CompletionTrigger.Invoke;

            StartNewModelComputation(completionService, trigger);
        }
 CommandState ICommandHandler <InvokeCompletionListCommandArgs> .GetCommandState(InvokeCompletionListCommandArgs args, Func <CommandState> nextHandler)
 {
     AssertIsForeground();
     return(nextHandler());
 }
 void ICommandHandler <InvokeCompletionListCommandArgs> .ExecuteCommand(InvokeCompletionListCommandArgs args, System.Action nextHandler)
 {
     AssertIsForeground();
     ExecuteCommandWorker(args, nextHandler);
 }
 CommandState ICommandHandler <InvokeCompletionListCommandArgs> .GetCommandState(InvokeCompletionListCommandArgs args, System.Func <CommandState> nextHandler)
 {
     AssertIsForeground();
     return(GetCommandStateWorker(args, nextHandler));
 }
 void IChainedCommandHandler <InvokeCompletionListCommandArgs> .ExecuteCommand(InvokeCompletionListCommandArgs args, Action nextHandler, CommandExecutionContext context)
 {
     AssertIsForeground();
     ExecuteCommandWorker(args, nextHandler, context);
 }
 CommandState IChainedCommandHandler <InvokeCompletionListCommandArgs> .GetCommandState(InvokeCompletionListCommandArgs args, Func <CommandState> nextHandler)
 {
     AssertIsForeground();
     return(CommandState.Available);
 }