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)); }
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)); }