private CompletionRules( bool dismissIfEmpty, bool dismissIfLastCharacterDeleted, ImmutableArray <char> defaultCommitCharacters, EnterKeyRule defaultEnterKeyRule, SnippetsRule snippetsRule) { DismissIfEmpty = dismissIfEmpty; DismissIfLastCharacterDeleted = dismissIfLastCharacterDeleted; DefaultCommitCharacters = defaultCommitCharacters.NullToEmpty(); DefaultEnterKeyRule = defaultEnterKeyRule; SnippetsRule = snippetsRule; }
private CompletionRules( bool dismissIfEmpty, bool dismissIfLastCharacterDeleted, ImmutableArray<char> defaultCommitCharacters, EnterKeyRule defaultEnterKeyRule, SnippetsRule snippetsRule) { this.DismissIfEmpty = dismissIfEmpty; this.DismissIfLastCharacterDeleted = dismissIfLastCharacterDeleted; this.DefaultCommitCharacters = defaultCommitCharacters.NullToEmpty(); this.DefaultEnterKeyRule = defaultEnterKeyRule; this.SnippetsRule = snippetsRule; }
private CompletionRules( bool dismissIfEmpty, bool dismissIfLastCharacterDeleted, ImmutableArray <char> defaultCommitCharacters, EnterKeyRule defaultEnterKeyRule, SnippetsRule snippetsRule) { this.DismissIfEmpty = dismissIfEmpty; this.DismissIfLastCharacterDeleted = dismissIfLastCharacterDeleted; this.DefaultCommitCharacters = defaultCommitCharacters.IsDefault ? ImmutableArray <char> .Empty : defaultCommitCharacters; this.DefaultEnterKeyRule = defaultEnterKeyRule; this.SnippetsRule = snippetsRule; }
/// <summary> /// Creates a new <see cref="CompletionRules"/> instance. /// </summary> /// <param name="dismissIfEmpty">True if the completion list should be dismissed if the user's typing causes it to filter and display no items.</param> /// <param name="dismissIfLastCharacterDeleted">True if the list should be dismissed when the user deletes the last character in the span.</param> /// <param name="defaultCommitCharacters">The default set of typed characters that cause the selected item to be committed.</param> /// <param name="defaultEnterKeyRule">The default rule that determines if the enter key is passed through to the editor after the selected item has been committed.</param> /// <param name="snippetsRule">The rule that controls snippets behavior.</param> public static CompletionRules Create( bool dismissIfEmpty = false, bool dismissIfLastCharacterDeleted = false, ImmutableArray<char> defaultCommitCharacters = default(ImmutableArray<char>), EnterKeyRule defaultEnterKeyRule = EnterKeyRule.Default, SnippetsRule snippetsRule = SnippetsRule.Default) { return new CompletionRules( dismissIfEmpty: dismissIfEmpty, dismissIfLastCharacterDeleted: dismissIfLastCharacterDeleted, defaultCommitCharacters: defaultCommitCharacters, defaultEnterKeyRule: defaultEnterKeyRule, snippetsRule: snippetsRule); }
/// <summary> /// Creates a new <see cref="CompletionRules"/> instance. /// </summary> /// <param name="dismissIfEmpty">True if the completion list should be dismissed if the user's typing causes it to filter and display no items.</param> /// <param name="dismissIfLastCharacterDeleted">True if the list should be dismissed when the user deletes the last character in the span.</param> /// <param name="defaultCommitCharacters">The default set of typed characters that cause the selected item to be committed.</param> /// <param name="defaultEnterKeyRule">The default rule that determines if the enter key is passed through to the editor after the selected item has been committed.</param> /// <param name="snippetsRule">The rule that controls snippets behavior.</param> public static CompletionRules Create( bool dismissIfEmpty = false, bool dismissIfLastCharacterDeleted = false, ImmutableArray <char> defaultCommitCharacters = default, EnterKeyRule defaultEnterKeyRule = EnterKeyRule.Default, SnippetsRule snippetsRule = SnippetsRule.Default) { return(new CompletionRules( dismissIfEmpty: dismissIfEmpty, dismissIfLastCharacterDeleted: dismissIfLastCharacterDeleted, defaultCommitCharacters: defaultCommitCharacters, defaultEnterKeyRule: defaultEnterKeyRule, snippetsRule: snippetsRule)); }
/// <summary> /// Creates a copy of the this <see cref="CompletionRules"/> with the <see cref="SnippetsRule"/> property changed. /// </summary> public CompletionRules WithSnippetsRule(SnippetsRule snippetsRule) { return With(snippetsRule: snippetsRule); }
/// <summary> /// Creates a copy of the this <see cref="CompletionRules"/> with the <see cref="SnippetsRule"/> property changed. /// </summary> public CompletionRules WithSnippetsRule(SnippetsRule snippetsRule) { return(With(snippetsRule: snippetsRule)); }
public CompletionRules WithSnippetsRule(SnippetsRule snippetsRule) => With(snippetsRule: snippetsRule);