Exemple #1
0
        void SignatureHelpSession_Disposed(object sender, EventArgs e)
        {
            var session = (SignatureHelpSession)sender;

            session.Disposed -= SignatureHelpSession_Disposed;
            if (this.session == session)
            {
                this.session = null;
            }
        }
Exemple #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);
        }
Exemple #3
0
 public void Dispose()
 {
     CancelSession();
     session = null;
     textView.Caret.PositionChanged -= Caret_PositionChanged;
 }
Exemple #4
0
 void CancelSession()
 {
     session?.Dispose();
     session = null;
 }
		public void Dispose() {
			CancelSession();
			session = null;
			textView.Caret.PositionChanged -= Caret_PositionChanged;
		}
		void CancelSession() {
			session?.Dispose();
			session = null;
		}
		void SignatureHelpSession_Disposed(object sender, EventArgs e) {
			var session = (SignatureHelpSession)sender;
			session.Disposed -= SignatureHelpSession_Disposed;
			if (this.session == session)
				this.session = null;
		}
		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);