예제 #1
0
        public UpdateResponse <TDocument> Update <TDocument, TPartialDocument>(IndexName index, Id id, Action <UpdateRequestDescriptor <TDocument, TPartialDocument> > configureRequest = null)
        {
            var descriptor = new UpdateRequestDescriptor <TDocument, TPartialDocument>(index, id);

            configureRequest?.Invoke(descriptor);
            return(DoRequest <UpdateRequestDescriptor <TDocument, TPartialDocument>, UpdateResponse <TDocument> >(descriptor));
        }
예제 #2
0
        public Task <UpdateResponse <TDocument> > UpdateAsync <TDocument, TPartialDocument>(IndexName index, Id id, Action <UpdateRequestDescriptor <TDocument, TPartialDocument> > configureRequest = null, CancellationToken cancellationToken = default)
        {
            var descriptor = new UpdateRequestDescriptor <TDocument, TPartialDocument>(index, id);

            configureRequest?.Invoke(descriptor);
            return(DoRequestAsync <UpdateRequestDescriptor <TDocument, TPartialDocument>, UpdateResponse <TDocument> >(descriptor));
        }