Assets.Scripts.Console.ArgumentCandinateState.HandleAutoComplete C# (CSharp) Метод

HandleAutoComplete() публичный Метод

public HandleAutoComplete ( ) : bool
Результат bool
        public override bool HandleAutoComplete()
        {
            if (CandinatesList.hasValidSelection)
            {
                var Selection = CandinatesList.SelectedName;

                int Index = ParentView.inputText.LastIndexOf(' ');

                DebugHelper.Assert(Index != -1);

                if (Index < ParentView.inputText.Length - 1)
                {
                    ParentView.inputText = ParentView.inputText.Remove(Index + 1);
                }

                ParentView.inputText += Selection;

                return true;
            }

            return false;
        }