public QueryInstanceWrapper(QueryTemplate queryTemplate, IQuerier querier) { this._queryTemplate = queryTemplate; this._querier = querier; }
internal QueryInstance(QueryTemplate queryTemplate, IQuerier querier) { this._queryTemplate = queryTemplate; this._querier = querier; }
public static Task <IImmutableList <TResponse> > SearchAsync <TResponse>(this IQuerier <Search, IImmutableList <TResponse> > queryHandler, string text) { return(queryHandler.QueryAsync(new Search(text))); }
public static Task <IImmutableList <TResponse> > GetAsync <TQuery, TResponse>(this IQuerier <Get <TQuery>, IImmutableList <TResponse> > queryHandler, IEnumerable <Id <TQuery> > ids) { return(queryHandler.QueryAsync(new Get <TQuery>(ids.ToImmutableList()))); }
public static QueryInstanceWrapper RunEQSQuery(QueryTemplate queryTemplate, IQuerier querier) => new QueryInstanceWrapper(queryTemplate, querier);
public string Convert(string source, IQuerier data, Keywords keyword) { if (ValidateSource(source, keyword) == false) { throw new ArgumentException("Invalid source"); } StringBuilder sb = new StringBuilder(); string[] splitSource = GetSplitByForEach(source, keyword); for (int i = 0; i < splitSource.Length; i++) { if (i % 2 == 0) { // Simple Add string[] xpathSplit = splitSource[i].Split(new string[] { keyword.XPath }, StringSplitOptions.None); for (int j = 0; j < xpathSplit.Length; j++) { if (j % 2 == 0) { sb.Append(xpathSplit[j]); } else { sb.Append(EscapeLaTeX(data.GetData(xpathSplit[j]).First())); } } } else { string[] xpathSplit = splitSource[i].Split(new string[] { keyword.XPath }, StringSplitOptions.None); IList <IEnumerator <string> > listEnum = new List <IEnumerator <string> >(); // Get odd ones for (int j = 1; j < xpathSplit.Length; j += 2) { listEnum.Add(data.GetData(xpathSplit[j]).GetEnumerator()); } while (MoveNext(listEnum)) { for (int j = 0; j < xpathSplit.Length; j++) { if (j % 2 == 0) { sb.Append(xpathSplit[j]); } else { sb.Append(EscapeLaTeX(listEnum[j / 2].Current)); } } } foreach (var enumerators in listEnum) { enumerators.Dispose(); } } } return(sb.ToString()); }
public AspNetCoreQuerier(IQuerier querier, IServiceProvider serviceProvider) { _querier = querier; _serviceProvider = serviceProvider; }