public static void Add(this SuggestionSourceList suggestionSources, SuggestDelegate suggest) { if (suggestionSources is null) { throw new ArgumentNullException(nameof(suggestionSources)); } if (suggest is null) { throw new ArgumentNullException(nameof(suggest)); } suggestionSources.Add(new AnonymousSuggestionSource(suggest)); }
public static void Add( this SuggestionSourceList suggestionSources, params string[] suggestions) { if (suggestionSources is null) { throw new ArgumentNullException(nameof(suggestionSources)); } if (suggestions is null) { throw new ArgumentNullException(nameof(suggestions)); } suggestionSources.Add(new AnonymousSuggestionSource((_, __) => suggestions)); }