public static IEnumerable <KeyValuePair <string, DType> > GetArgumentSuggestions(TryGetEnumSymbol tryGetEnumSymbol, bool suggestUnqualifiedEnums, TexlFunction function, DType scopeType, int argumentIndex, out bool requiresSuggestionEscaping) { if (CustomFunctionSuggestionProviders.Value.TryGetValue(function.GetType(), out var suggestor)) { return(suggestor(tryGetEnumSymbol, suggestUnqualifiedEnums, scopeType, argumentIndex, out requiresSuggestionEscaping)); } requiresSuggestionEscaping = false; return(Enumerable.Empty <KeyValuePair <string, DType> >()); }
public static void TestOnly_AddFunctionHandler(TexlFunction func, GetArgumentSuggestionsDelegate suggestor) { CustomFunctionSuggestionProviders.Value.Add(func.GetType(), suggestor); }