public Task <IEnumerable <TResult> > LoadStartingWithAsync <TTransformer, TResult>(string keyPrefix, string matches = null, int start = 0, int pageSize = 25, string exclude = null, RavenPagingInformation pagingInformation = null, Action <ILoadConfiguration> configure = null) where TTransformer : AbstractTransformerCreationTask, new() { var transformer = new TTransformer().TransformerName; var configuration = new RavenLoadConfiguration(); if (configure != null) { configure(configuration); } return(AsyncDatabaseCommands.StartsWithAsync(keyPrefix, matches, start, pageSize, exclude: exclude, pagingInformation: pagingInformation, transformer: transformer, queryInputs: configuration.QueryInputs) .ContinueWith( task => (IEnumerable <TResult>)task.Result.Select(TrackEntity <TResult>).ToList())); }
public Task <IEnumerable <TResult> > LoadStartingWithAsync <TTransformer, TResult>(string keyPrefix, string matches = null, int start = 0, int pageSize = 25, string exclude = null, RavenPagingInformation pagingInformation = null, Action <ILoadConfiguration> configure = null, string skipAfter = null, CancellationToken token = default(CancellationToken)) where TTransformer : AbstractTransformerCreationTask, new() { var transformer = new TTransformer().TransformerName; var configuration = new RavenLoadConfiguration(); if (configure != null) { configure(configuration); } var queryOperation = new QueryOperation(this, "Load/StartingWith", null, null, false, TimeSpan.Zero, null, null, false); return(AsyncDatabaseCommands.StartsWithAsync(keyPrefix, matches, start, pageSize, exclude: exclude, pagingInformation: pagingInformation, transformer: transformer, transformerParameters: configuration.TransformerParameters, skipAfter: skipAfter, token: token) .ContinueWith( task => (IEnumerable <TResult>)task.Result.Select(x => queryOperation.Deserialize <TResult>(x.ToJson())).ToList(), token)); }
/// <summary> /// Load documents with the specified key prefix /// </summary> public Task <IEnumerable <T> > LoadStartingWithAsync <T>(string keyPrefix, string matches = null, int start = 0, int pageSize = 25, string exclude = null, RavenPagingInformation pagingInformation = null, string skipAfter = null, CancellationToken token = default(CancellationToken)) { return(AsyncDatabaseCommands.StartsWithAsync(keyPrefix, matches, start, pageSize, exclude: exclude, pagingInformation: pagingInformation, skipAfter: skipAfter, token: token) .ContinueWith(task => (IEnumerable <T>)task.Result.Select(TrackEntity <T>).ToList(), token)); }