88
99namespace Nest
1010{
11- using UpgradeStatusResponseConverter = Func < IElasticsearchResponse , Stream , UpgradeStatusResponse > ;
12-
1311 public partial class ElasticClient
1412 {
1513 public IUpgradeResponse Upgrade ( IUpgradeRequest upgradeRequest )
@@ -50,9 +48,7 @@ public IUpgradeStatusResponse UpgradeStatus(IUpgradeStatusRequest upgradeStatusR
5048 {
5149 return this . Dispatcher . Dispatch < IUpgradeStatusRequest , UpgradeStatusRequestParameters , UpgradeStatusResponse > (
5250 upgradeStatusRequest ,
53- ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatch < UpgradeStatusResponse > (
54- p . DeserializationState ( new UpgradeStatusResponseConverter ( ( r , s ) => DeserializeUpgradeStatusResponse ( r , s ) ) )
55- )
51+ ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatch < UpgradeStatusResponse > ( p )
5652 ) ;
5753 }
5854
@@ -61,19 +57,15 @@ public IUpgradeStatusResponse UpgradeStatus(Func<UpgradeStatusDescriptor, Upgrad
6157 upgradeStatusDescriptor = upgradeStatusDescriptor ?? ( s => s ) ;
6258 return this . Dispatcher . Dispatch < UpgradeStatusDescriptor , UpgradeStatusRequestParameters , UpgradeStatusResponse > (
6359 upgradeStatusDescriptor ,
64- ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatch < UpgradeStatusResponse > (
65- p . DeserializationState ( new UpgradeStatusResponseConverter ( ( r , s ) => DeserializeUpgradeStatusResponse ( r , s ) ) )
66- )
60+ ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatch < UpgradeStatusResponse > ( p )
6761 ) ;
6862 }
6963
7064 public Task < IUpgradeStatusResponse > UpgradeStatusAsync ( IUpgradeStatusRequest upgradeStatusRequest )
7165 {
7266 return this . Dispatcher . DispatchAsync < IUpgradeStatusRequest , UpgradeStatusRequestParameters , UpgradeStatusResponse , IUpgradeStatusResponse > (
7367 upgradeStatusRequest ,
74- ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatchAsync < UpgradeStatusResponse > (
75- p . DeserializationState ( new UpgradeStatusResponseConverter ( ( r , s ) => DeserializeUpgradeStatusResponse ( r , s ) ) )
76- )
68+ ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatchAsync < UpgradeStatusResponse > ( p )
7769 ) ;
7870 }
7971
@@ -82,18 +74,8 @@ public Task<IUpgradeStatusResponse> UpgradeStatusAsync(Func<UpgradeStatusDescrip
8274 upgradeStatusDescriptor = upgradeStatusDescriptor ?? ( s => s ) ;
8375 return this . Dispatcher . DispatchAsync < UpgradeStatusDescriptor , UpgradeStatusRequestParameters , UpgradeStatusResponse , IUpgradeStatusResponse > (
8476 upgradeStatusDescriptor ,
85- ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatchAsync < UpgradeStatusResponse > (
86- p . DeserializationState ( new UpgradeStatusResponseConverter ( ( r , s ) => DeserializeUpgradeStatusResponse ( r , s ) ) )
87- )
77+ ( p , d ) => this . RawDispatch . IndicesGetUpgradeDispatchAsync < UpgradeStatusResponse > ( p )
8878 ) ;
8979 }
90-
91- private UpgradeStatusResponse DeserializeUpgradeStatusResponse ( IElasticsearchResponse response , Stream stream )
92- {
93- return new UpgradeStatusResponse
94- {
95- Upgrades = this . Serializer . Deserialize < Dictionary < string , UpgradeStatus > > ( stream )
96- } ;
97- }
9880 }
9981}
0 commit comments