예제 #1
0
        public Task <CountResponse> CountAsync <TDocument>(Action <CountRequestDescriptor <TDocument> > configureRequest = null, CancellationToken cancellationToken = default)
        {
            var descriptor = new CountRequestDescriptor <TDocument>();

            configureRequest?.Invoke(descriptor);
            descriptor.BeforeRequest();
            return(DoRequestAsync <CountRequestDescriptor <TDocument>, CountResponse>(descriptor));
        }
예제 #2
0
        public CountResponse Count <TDocument>(Action <CountRequestDescriptor <TDocument> > configureRequest = null)
        {
            var descriptor = new CountRequestDescriptor <TDocument>();

            configureRequest?.Invoke(descriptor);
            descriptor.BeforeRequest();
            return(DoRequest <CountRequestDescriptor <TDocument>, CountResponse>(descriptor));
        }