Emoji.Intellisense.CommandFilter.StartSession C# (CSharp) Метод

StartSession() приватный Метод

Display list of potential tokens
private StartSession ( ) : bool
Результат bool
        bool StartSession()
        {
            if (_currentSession != null)
                return false;

            SnapshotPoint caret = TextView.Caret.Position.BufferPosition;
            ITextSnapshot snapshot = caret.Snapshot;

            if (!_emojiLocationHandler.CanHazEmoji(new SnapshotSpan(caret - 1, caret)))
                return false;

            if (!Broker.IsCompletionActive(TextView))
            {
                _currentSession = Broker.CreateCompletionSession(TextView, snapshot.CreateTrackingPoint(caret, PointTrackingMode.Positive), true);
            }
            else
            {
                _currentSession = Broker.GetSessions(TextView)[0];
            }
            _currentSession.Dismissed += (sender, args) => _currentSession = null;

            if (!_currentSession.IsStarted)
                _currentSession.Start();

            return true;
        }