Skip to content

Commit 3534c2f

Browse files
committed
Move dispatch methods to IElasticClient interface
1 parent b8416c0 commit 3534c2f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/Nest/IElasticClient.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,5 +1767,39 @@ Task<IExistsResponse> SearchExistsAsync<T>(Func<SearchExistsDescriptor<T>, Searc
17671767
ICatResponse<CatSegmentsRecord> CatSegments(ICatSegmentsRequest request);
17681768
Task<ICatResponse<CatSegmentsRecord>> CatSegmentsAsync(Func<CatSegmentsDescriptor, CatSegmentsDescriptor> selector = null);
17691769
Task<ICatResponse<CatSegmentsRecord>> CatSegmentsAsync(ICatSegmentsRequest request);
1770+
1771+
R Dispatch<D, Q, R>(
1772+
D descriptor
1773+
, Func<ElasticsearchPathInfo<Q>, D, ElasticsearchResponse<R>> dispatch
1774+
)
1775+
where Q : FluentRequestParameters<Q>, new()
1776+
where D : IRequest<Q>
1777+
where R : BaseResponse;
1778+
1779+
R Dispatch<D, Q, R>(
1780+
Func<D, D> selector
1781+
, Func<ElasticsearchPathInfo<Q>, D, ElasticsearchResponse<R>> dispatch
1782+
)
1783+
where Q : FluentRequestParameters<Q>, new()
1784+
where D : IRequest<Q>, new()
1785+
where R : BaseResponse;
1786+
1787+
Task<I> DispatchAsync<D, Q, R, I>(
1788+
D descriptor
1789+
, Func<ElasticsearchPathInfo<Q>, D, Task<ElasticsearchResponse<R>>> dispatch
1790+
)
1791+
where Q : FluentRequestParameters<Q>, new()
1792+
where D : IRequest<Q>
1793+
where R : BaseResponse, I
1794+
where I : IResponse;
1795+
1796+
Task<I> DispatchAsync<D, Q, R, I>(
1797+
Func<D, D> selector
1798+
, Func<ElasticsearchPathInfo<Q>, D, Task<ElasticsearchResponse<R>>> dispatch
1799+
)
1800+
where Q : FluentRequestParameters<Q>, new()
1801+
where D : IRequest<Q>, new()
1802+
where R : BaseResponse, I
1803+
where I : IResponse;
17701804
}
17711805
}

0 commit comments

Comments
 (0)