コード例 #1
0
        void SignatureHelpSession_Disposed(object sender, EventArgs e)
        {
            var session = (SignatureHelpSession)sender;

            session.Disposed -= SignatureHelpSession_Disposed;
            if (this.session == session)
            {
                this.session = null;
            }
        }
コード例 #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);
        }
コード例 #3
0
 public void Dispose()
 {
     CancelSession();
     session = null;
     textView.Caret.PositionChanged -= Caret_PositionChanged;
 }
コード例 #4
0
 void CancelSession()
 {
     session?.Dispose();
     session = null;
 }
コード例 #5
0
		public void Dispose() {
			CancelSession();
			session = null;
			textView.Caret.PositionChanged -= Caret_PositionChanged;
		}
コード例 #6
0
		void CancelSession() {
			session?.Dispose();
			session = null;
		}
コード例 #7
0
		void SignatureHelpSession_Disposed(object sender, EventArgs e) {
			var session = (SignatureHelpSession)sender;
			session.Disposed -= SignatureHelpSession_Disposed;
			if (this.session == session)
				this.session = null;
		}
コード例 #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);
		}
コード例 #9
0
 public ISignature GetBestMatch(ISignatureHelpSession session) =>
 SignatureHelpSession.TryGetSession(session)?.GetBestMatch();
コード例 #10
0
 public void AugmentSignatureHelpSession(ISignatureHelpSession session, IList <ISignature> signatures) =>
 SignatureHelpSession.TryGetSession(session)?.AugmentSignatureHelpSession(signatures);