public ISmartTagSession CreateSmartTagSession(ITextView textView, SmartTagType type, ITrackingPoint triggerPoint, SmartTagState state) {
     var session = new MockSmartTagSession(this) {
         TextView = textView,
         Type = type,
         TriggerPoint = triggerPoint,
         State = state
     };
     lock (_sessions) {
         _sessions.Add(new KeyValuePair<ITextView, ISmartTagSession>(textView, session));
     }
     session.Dismissed += Session_Dismissed;
     return session;
 }
示例#2
0
        public ISmartTagSession CreateSmartTagSession(ITextView textView, SmartTagType type, ITrackingPoint triggerPoint, SmartTagState state)
        {
            var session = new MockSmartTagSession(this)
            {
                TextView     = textView,
                Type         = type,
                TriggerPoint = triggerPoint,
                State        = state
            };

            lock (_sessions) {
                _sessions.Add(new KeyValuePair <ITextView, ISmartTagSession>(textView, session));
            }
            session.Dismissed += Session_Dismissed;
            return(session);
        }