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 virtual void TriggerSmartTag(ITrackingPoint triggerPoint, SmartTagType type, SmartTagState state)
        {
            DismissSmartTag();
            ISmartTagSession session = Provider.SmartTagBroker.CreateSmartTagSession(TextView, type, triggerPoint, state);

            if (session != null)
            {
                session.Dismissed += HandleSmartTagDismissed;
                SmartTagSession    = session;
            }
        }
示例#3
0
 void ITvlIntellisenseController.TriggerSmartTag(ITrackingPoint triggerPoint, SmartTagType type, SmartTagState state)
 {
     Contract.Requires <ArgumentNullException>(triggerPoint != null, "triggerPoint");
     throw new NotImplementedException();
 }
示例#4
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);
        }
 public virtual void TriggerSmartTag(ITrackingPoint triggerPoint, SmartTagType type, SmartTagState state)
 {
     DismissSmartTag();
     ISmartTagSession session = Provider.SmartTagBroker.CreateSmartTagSession(TextView, type, triggerPoint, state);
     if (session != null)
     {
         session.Dismissed += HandleSmartTagDismissed;
         SmartTagSession = session;
     }
 }
 void ITvlIntellisenseController.TriggerSmartTag(ITrackingPoint triggerPoint, SmartTagType type, SmartTagState state)
 {
     Contract.Requires<ArgumentNullException>(triggerPoint != null, "triggerPoint");
     throw new NotImplementedException();
 }