public static IQueryNode Run(IQueryNode node, IDictionary <string, string> includes, IQueryVisitorContextWithIncludeResolver context = null, ShouldSkipIncludeFunc shouldSkipInclude = null) { return(RunAsync(node, includes, context, shouldSkipInclude).GetAwaiter().GetResult()); }
public static IQueryNode Run(IQueryNode node, Func <string, string> includeResolver, IQueryVisitorContextWithIncludeResolver context = null, ShouldSkipIncludeFunc shouldSkipInclude = null) { return(RunAsync(node, name => Task.FromResult(includeResolver(name)), context, shouldSkipInclude).GetAwaiter().GetResult()); }
public static Task <IQueryNode> RunAsync(IQueryNode node, IDictionary <string, string> includes, IQueryVisitorContextWithIncludeResolver context = null, ShouldSkipIncludeFunc shouldSkipInclude = null) { return(RunAsync(node, name => Task.FromResult(includes.ContainsKey(name) ? includes[name] : null), context, shouldSkipInclude)); }
public static Task <IQueryNode> RunAsync(IQueryNode node, IncludeResolver includeResolver, IQueryVisitorContextWithIncludeResolver context = null, ShouldSkipIncludeFunc shouldSkipInclude = null) { return(new IncludeVisitor(shouldSkipInclude).AcceptAsync(node, context ?? new QueryVisitorContextWithIncludeResolver { IncludeResolver = includeResolver })); }
public IncludeVisitor(ShouldSkipIncludeFunc shouldSkipInclude = null) { _shouldSkipInclude = shouldSkipInclude; }
public ElasticQueryParserConfiguration UseIncludes(IncludeResolver includeResolver, ShouldSkipIncludeFunc shouldSkipInclude = null, int priority = 0) { IncludeResolver = includeResolver; return(AddVisitor(new IncludeVisitor(shouldSkipInclude), priority)); }
public ElasticQueryParserConfiguration UseIncludes(IDictionary <string, string> includes, ShouldSkipIncludeFunc shouldSkipInclude = null, int priority = 0) { return(UseIncludes(name => includes.ContainsKey(name) ? includes[name] : null, shouldSkipInclude, priority)); }
public ElasticQueryParserConfiguration UseIncludes(Func <string, string> resolveInclude, ShouldSkipIncludeFunc shouldSkipInclude = null, int priority = 0) { return(UseIncludes(name => Task.FromResult(resolveInclude(name)), shouldSkipInclude, priority)); }