public Task <CountResult> CountBySearchAsync(ISystemFilter systemFilter, string filter = null, string aggregations = null, ICommandOptions options = null) { var search = NewQuery() .MergeFrom(systemFilter?.GetQuery()) .FilterExpression(filter) .AggregationsExression(aggregations); return(CountAsync(search, options)); }
public Task <FindResults <T> > SearchAsync(ISystemFilter systemFilter, string filter = null, string criteria = null, string sort = null, string aggregations = null, ICommandOptions options = null) { var search = NewQuery() .MergeFrom(systemFilter?.GetQuery()) .FilterExpression(filter) .SearchExpression(criteria) .AggregationsExression(aggregations) .SortExpression(sort); return(FindAsync(search, options)); }
/// <summary> /// System filter that will be applied to the repository query to enforce tenancy or system rules /// </summary> public static T SystemFilter <T>(this T query, ISystemFilter filter) where T : IRepositoryQuery { return(query.BuildOption(SystemFilterKey, filter)); }
public static Task <FindResults <T> > SearchAsync <T>(this ISearchableReadOnlyRepository <T> repository, ISystemFilter systemFilter, string filter = null, string criteria = null, string sort = null, string aggregations = null, CommandOptionsDescriptor <T> options = null) where T : class, new() { return(repository.SearchAsync(systemFilter, filter, criteria, sort, aggregations, options.Configure())); }
public static Task <CountResult> CountBySearchAsync <T>(this ISearchableReadOnlyRepository <T> repository, ISystemFilter systemFilter, string filter = null, string aggregations = null, CommandOptionsDescriptor <T> options = null) where T : class, new() { return(repository.CountBySearchAsync(systemFilter, filter, aggregations, options.Configure())); }
public static void GetFeature <T>(this ISystemFilter system, out T feature) where T : FeatureBase { system.world.GetFeature(out feature); }
public static T GetFeature <T>(this ISystemFilter system) where T : FeatureBase { return(system.world.GetFeature <T>()); }
public virtual Task <CountResult> CountBySearchAsync(ISystemFilter systemFilter, string filter = null, string aggregations = null, ICommandOptions options = null) { return(CountAsync(q => q.SystemFilter(systemFilter).FilterExpression(filter).AggregationsExpression(aggregations), o => options.As <T>())); }
public virtual Task <FindResults <T> > SearchAsync(ISystemFilter systemFilter, string filter = null, string criteria = null, string sort = null, string aggregations = null, ICommandOptions options = null) { return(FindAsAsync <T>(q => q.SystemFilter(systemFilter).FilterExpression(filter).SearchExpression(criteria).SortExpression(sort).AggregationsExpression(aggregations), o => options.As <T>())); }