public static SignatureHelpSession TryCreate(SnapshotPoint triggerPosition, SignatureHelpTriggerInfo triggerInfo, Lazy <ISignatureHelpBroker> signatureHelpBroker, ITextView textView) { var info = SignatureHelpInfo.Create(triggerPosition.Snapshot); if (info == null) { return(null); } if (triggerInfo.TriggerReason == SignatureHelpTriggerReason.TypeCharCommand) { Debug.Assert(triggerInfo.TriggerCharacter != null); if (triggerInfo.TriggerCharacter != null && !info.Value.SignatureHelpService.IsTriggerCharacter(triggerInfo.TriggerCharacter.Value)) { return(null); } } else if (triggerInfo.TriggerReason == SignatureHelpTriggerReason.RetriggerCommand) { if (triggerInfo.TriggerCharacter != null && !info.Value.SignatureHelpService.IsRetriggerCharacter(triggerInfo.TriggerCharacter.Value)) { return(null); } } return(new SignatureHelpSession(info.Value.SignatureHelpService, signatureHelpBroker, textView)); }
bool RestartCore(SnapshotPoint triggerPosition, SignatureHelpTriggerInfo triggerInfo) { var info = SignatureHelpInfo.Create(triggerPosition.Snapshot); if (info == null) { return(false); } Start(info.Value, triggerPosition, triggerInfo); return(true); }