Ejemplo n.º 1
0
        public ReadOnlyCollection <ISignatureHelpSession> GetSessions(ITextView textView)
        {
            FrugalList <ISignatureHelpSession> tempSessionList = new FrugalList <ISignatureHelpSession>();

            IIntellisenseSessionStack sessionStack = this.IntellisenseSessionStackMap.GetStackForTextView(textView);

            if (sessionStack == null)
            {
                return(tempSessionList.AsReadOnly());
            }

            foreach (var session in sessionStack.Sessions)
            {
                ISignatureHelpSession sigHelpSession = session as ISignatureHelpSession;
                if (sigHelpSession != null)
                {
                    tempSessionList.Add(sigHelpSession);
                }
            }

            return(tempSessionList.AsReadOnly());
        }