コード例 #1
0
 public static IQueryNode Run(IQueryNode node, IDictionary <string, string> includes, IQueryVisitorContextWithIncludeResolver context = null, ShouldSkipIncludeFunc shouldSkipInclude = null)
 {
     return(RunAsync(node, includes, context, shouldSkipInclude).GetAwaiter().GetResult());
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 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
     }));
 }
コード例 #5
0
 public IncludeVisitor(ShouldSkipIncludeFunc shouldSkipInclude = null)
 {
     _shouldSkipInclude = shouldSkipInclude;
 }
コード例 #6
0
        public ElasticQueryParserConfiguration UseIncludes(IncludeResolver includeResolver, ShouldSkipIncludeFunc shouldSkipInclude = null, int priority = 0)
        {
            IncludeResolver = includeResolver;

            return(AddVisitor(new IncludeVisitor(shouldSkipInclude), priority));
        }
コード例 #7
0
 public ElasticQueryParserConfiguration UseIncludes(IDictionary <string, string> includes, ShouldSkipIncludeFunc shouldSkipInclude = null, int priority = 0)
 {
     return(UseIncludes(name => includes.ContainsKey(name) ? includes[name] : null, shouldSkipInclude, priority));
 }
コード例 #8
0
 public ElasticQueryParserConfiguration UseIncludes(Func <string, string> resolveInclude, ShouldSkipIncludeFunc shouldSkipInclude = null, int priority = 0)
 {
     return(UseIncludes(name => Task.FromResult(resolveInclude(name)), shouldSkipInclude, priority));
 }