/// <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;
 }
Esempio n. 9
0
 public MultiGetHitJsonConverter(IMultiGetRequest request) => _request = request;
Esempio n. 10
0
 private JsonConverter CreateCovariantMultiGetConverter(IMultiGetRequest descriptor) => new MultiGetHitJsonConverter(descriptor);
Esempio n. 11
0
 /// <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;
Esempio n. 13
0
 public static void Update(ElasticsearchPathInfo <MultiGetRequestParameters> pathInfo, IMultiGetRequest request)
 {
     pathInfo.HttpMethod = PathInfoHttpMethod.POST;
 }
Esempio n. 14
0
 /// <inheritdoc />
 public IMultiGetResponse MultiGet(IMultiGetRequest request) =>
 Dispatcher.Dispatch <IMultiGetRequest, MultiGetRequestParameters, MultiGetResponse>(
     request,
     (r, s) => DeserializeMultiGetResponse(r, s, CreateCovariantMultiGetConverter(request)),
     LowLevelDispatch.MgetDispatch <MultiGetResponse>
     );
Esempio n. 15
0
 public MultiGetResponseBuilder(IMultiGetRequest request) => Formatter = new MultiGetResponseFormatter(request);
		private JsonConverter CreateCovariantMultiGetConverter(IMultiGetRequest descriptor)
		{
			var multiGetHitConverter = new MultiGetHitConverter(descriptor);
			return multiGetHitConverter;
		}
Esempio n. 17
0
        private JsonConverter CreateCovariantMultiGetConverter(IMultiGetRequest descriptor)
        {
            var multiGetHitConverter = new MultiGetHitConverter(descriptor);

            return(multiGetHitConverter);
        }