Ejemplo n.º 1
0
        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> >());
        }
Ejemplo n.º 2
0
 public static void TestOnly_AddFunctionHandler(TexlFunction func, GetArgumentSuggestionsDelegate suggestor)
 {
     CustomFunctionSuggestionProviders.Value.Add(func.GetType(), suggestor);
 }