Esempio n. 1
0
        void SignatureHelpSession_Disposed(object sender, EventArgs e)
        {
            var session = (SignatureHelpSession)sender;

            session.Disposed -= SignatureHelpSession_Disposed;
            if (this.session == session)
            {
                this.session = null;
            }
        }
Esempio n. 2
0
        void TriggerSession(SignatureHelpTriggerInfo triggerInfo)
        {
            var position = textView.Caret.Position.BufferPosition;

            if (session == null)
            {
                session = SignatureHelpSession.TryCreate(position, triggerInfo, signatureHelpBroker, textView);
                if (session == null)
                {
                    return;
                }
                session.Disposed += SignatureHelpSession_Disposed;
            }
            session.Restart(position, triggerInfo);
        }
Esempio n. 3
0
 public void Dispose()
 {
     CancelSession();
     session = null;
     textView.Caret.PositionChanged -= Caret_PositionChanged;
 }
Esempio n. 4
0
 void CancelSession()
 {
     session?.Dispose();
     session = null;
 }
Esempio n. 5
0
		public void Dispose() {
			CancelSession();
			session = null;
			textView.Caret.PositionChanged -= Caret_PositionChanged;
		}
Esempio n. 6
0
		void CancelSession() {
			session?.Dispose();
			session = null;
		}
Esempio n. 7
0
		void SignatureHelpSession_Disposed(object sender, EventArgs e) {
			var session = (SignatureHelpSession)sender;
			session.Disposed -= SignatureHelpSession_Disposed;
			if (this.session == session)
				this.session = null;
		}
Esempio n. 8
0
		void TriggerSession(SignatureHelpTriggerInfo triggerInfo) {
			var position = textView.Caret.Position.BufferPosition;

			if (session == null) {
				session = SignatureHelpSession.TryCreate(position, triggerInfo, signatureHelpBroker, textView);
				if (session == null)
					return;
				session.Disposed += SignatureHelpSession_Disposed;
			}
			session.Restart(position, triggerInfo);
		}
 public ISignature GetBestMatch(ISignatureHelpSession session) =>
 SignatureHelpSession.TryGetSession(session)?.GetBestMatch();
 public void AugmentSignatureHelpSession(ISignatureHelpSession session, IList <ISignature> signatures) =>
 SignatureHelpSession.TryGetSession(session)?.AugmentSignatureHelpSession(signatures);