/// <inheritdoc/> public Task<IMultiGetResponse> MultiGetAsync(IMultiGetRequest request, CancellationToken cancellationToken = default(CancellationToken)) => this.Dispatcher.DispatchAsync<IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse, IMultiGetResponse>( request, cancellationToken, (r, s) => this.DeserializeMultiGetResponse(r, s, CreateCovariantMultiGetConverter(request)), this.LowLevelDispatch.MgetDispatchAsync<MultiGetResponse> );
/// <inheritdoc /> public Task<IMultiGetResponse> MultiGetAsync(IMultiGetRequest multiGetRequest) { var converter = CreateCovariantMultiGetConverter(multiGetRequest); var customCreator = new MultiGetConverter((r, s) => this.DeserializeMultiGetResponse(r, s, converter)); return this.DispatchAsync<IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse, IMultiGetResponse>( multiGetRequest, (p, d) => this.RawDispatch.MgetDispatchAsync<MultiGetResponse>(p.DeserializationState(customCreator), d) ); }
/// <inheritdoc /> public IMultiGetResponse MultiGet(IMultiGetRequest multiRequest) { var converter = CreateCovariantMultiGetConverter(multiRequest); var customCreator = new Func<IElasticsearchResponse, Stream, MultiGetResponse>((r, s) => this.DeserializeMultiGetResponse(r, s, converter)); return this.Dispatch<IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse>( multiRequest, (p, d) => this.RawDispatch.MgetDispatch<MultiGetResponse>(p.DeserializationState(customCreator), d) ); }
private JsonConverter CreateCovariantMultiGetConverter(IMultiGetRequest descriptor) => new MultiGetHitJsonConverter(descriptor);
/// <inheritdoc/> public IMultiGetResponse MultiGet(IMultiGetRequest request) => this.Dispatcher.Dispatch<IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse>( request, (r, s) => this.DeserializeMultiGetResponse(r, s, CreateCovariantMultiGetConverter(request)), this.LowLevelDispatch.MgetDispatch<MultiGetResponse> );
/// <inheritdoc/> public Task<IMultiGetResponse> MultiGetAsync(IMultiGetRequest request) => this.Dispatcher.DispatchAsync<IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse, IMultiGetResponse>( request, new MultiGetConverter((r, s) => this.DeserializeMultiGetResponse(r, s, CreateCovariantMultiGetConverter(request))), this.LowLevelDispatch.MgetDispatchAsync<MultiGetResponse> );
/// <inheritdoc /> public MultiGetResponse MultiGet(IMultiGetRequest request) { request.RequestParameters.DeserializationOverride = CreateMultiGetDeserializer(request); return(DoRequest <IMultiGetRequest, MultiGetResponse>(request, request.RequestParameters)); }
public MultiGetHitConverter(IMultiGetRequest request) { _request = request; }
public MultiGetHitJsonConverter(IMultiGetRequest request) => _request = request;
/// <inheritdoc/> public Task <IMultiGetResponse> MultiGetAsync(IMultiGetRequest request) => this.Dispatcher.DispatchAsync <IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse, IMultiGetResponse>( request, new MultiGetConverter((r, s) => this.DeserializeMultiGetResponse(r, s, CreateCovariantMultiGetConverter(request))), this.LowLevelDispatch.MgetDispatchAsync <MultiGetResponse> );
public MultiGetResponseFormatter(IMultiGetRequest request) => _request = request;
public static void Update(ElasticsearchPathInfo <MultiGetRequestParameters> pathInfo, IMultiGetRequest request) { pathInfo.HttpMethod = PathInfoHttpMethod.POST; }
/// <inheritdoc /> public IMultiGetResponse MultiGet(IMultiGetRequest request) => Dispatcher.Dispatch <IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse>( request, (r, s) => DeserializeMultiGetResponse(r, s, CreateCovariantMultiGetConverter(request)), LowLevelDispatch.MgetDispatch <MultiGetResponse> );
public MultiGetResponseBuilder(IMultiGetRequest request) => Formatter = new MultiGetResponseFormatter(request);
private JsonConverter CreateCovariantMultiGetConverter(IMultiGetRequest descriptor) { var multiGetHitConverter = new MultiGetHitConverter(descriptor); return multiGetHitConverter; }
private JsonConverter CreateCovariantMultiGetConverter(IMultiGetRequest descriptor) { var multiGetHitConverter = new MultiGetHitConverter(descriptor); return(multiGetHitConverter); }