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 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);