예제 #1
0
        public async static Task <string[]> BasicallyRun(
            this Pipeline.Function fun,
            string token,
            int i           = 0,
            string[]?tokens = null !)
        {
            var result            = new List <string>();
            var cancellationToken = new CancellationToken();

            await foreach (Token t in fun(
                               new Token(token),
                               i,
                               tokens is null ?
                               AsyncEnumerableExtensions.Empty <Token>() :
                               tokens
                               .Select(s => new Token(s))
                               .ToAsyncEnumerable(cancellationToken),
                               cancellationToken))
            {
                result.Add(t.String);
            }
            return(result.ToArray());
        }
예제 #2
0
 public IAsyncEnumerable <SearchResult> SearchAsync(string query, CancellationToken cancellationToken = default)
 {
     return(AsyncEnumerableExtensions.Empty <SearchResult>());
 }