Beispiel #1
0
        public T[] LoadStartingWith <T>(string idPrefix, string matches = null, int start = 0, int pageSize = 25, string exclude = null,
                                        string startAfter = null)
        {
            var loadStartingWithOperation = new LoadStartingWithOperation(this);

            LoadStartingWithInternal(idPrefix, loadStartingWithOperation, null, matches, start, pageSize, exclude, startAfter);
            return(loadStartingWithOperation.GetDocuments <T>());
        }
Beispiel #2
0
        public async Task <IEnumerable <T> > LoadStartingWithAsync <T>(string idPrefix, string matches = null, int start = 0,
                                                                       int pageSize      = 25, string exclude = null,
                                                                       string startAfter = null, CancellationToken token = default(CancellationToken))
        {
            var operation = new LoadStartingWithOperation(this);

            await LoadStartingWithInternal(idPrefix, operation, null, matches, start,
                                           pageSize, exclude, startAfter, token).ConfigureAwait(false);

            return(operation.GetDocuments <T>());
        }
        public T[] LoadStartingWith <T>(string keyPrefix, string matches = null, int start = 0, int pageSize = 25, string exclude = null,
                                        RavenPagingInformation pagingInformation = null, string skipAfter = null)
        {
            IncrementRequestCount();

            var loadStartingWithOperation = new LoadStartingWithOperation(this);

            loadStartingWithOperation.WithStartWith(keyPrefix, matches, start, pageSize, exclude, pagingInformation, skipAfter: skipAfter);

            var command = loadStartingWithOperation.CreateRequest();

            if (command != null)
            {
                RequestExecuter.Execute(command, Context);
                loadStartingWithOperation.SetResult(command.Result);
            }

            return(loadStartingWithOperation.GetDocuments <T>());
        }
        public async 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))
        {
            IncrementRequestCount();

            var loadStartingWithOperation = new LoadStartingWithOperation(this);

            loadStartingWithOperation.WithStartWith(keyPrefix, matches, start, pageSize, exclude, pagingInformation, skipAfter: skipAfter);

            var command = loadStartingWithOperation.CreateRequest();

            if (command != null)
            {
                await RequestExecuter.ExecuteAsync(command, Context, token);

                loadStartingWithOperation.SetResult(command.Result);
            }

            return(loadStartingWithOperation.GetDocuments <T>());
        }