@@ -29,8 +29,9 @@ public void QueueCommand(Action<IRedisTypedClient<T>> command, Action onSuccessC
2929
3030 public void QueueCommand ( Action < IRedisTypedClient < T > > command , Action onSuccessCallback , Action < Exception > onErrorCallback )
3131 {
32- BeginQueuedCommand ( new QueuedRedisOperation
32+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
3333 {
34+ VoidReturnCommand = command ,
3435 OnSuccessVoidCallback = onSuccessCallback ,
3536 OnErrorCallback = onErrorCallback
3637 } ) ;
@@ -50,8 +51,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, int> command, Action<int> on
5051
5152 public void QueueCommand ( Func < IRedisTypedClient < T > , int > command , Action < int > onSuccessCallback , Action < Exception > onErrorCallback )
5253 {
53- BeginQueuedCommand ( new QueuedRedisOperation
54+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
5455 {
56+ IntReturnCommand = command ,
5557 OnSuccessIntCallback = onSuccessCallback ,
5658 OnErrorCallback = onErrorCallback
5759 } ) ;
@@ -71,8 +73,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, long> command, Action<long>
7173
7274 public void QueueCommand ( Func < IRedisTypedClient < T > , long > command , Action < long > onSuccessCallback , Action < Exception > onErrorCallback )
7375 {
74- BeginQueuedCommand ( new QueuedRedisOperation
76+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
7577 {
78+ LongReturnCommand = command ,
7679 OnSuccessLongCallback = onSuccessCallback ,
7780 OnErrorCallback = onErrorCallback
7881 } ) ;
@@ -92,8 +95,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, bool> command, Action<bool>
9295
9396 public void QueueCommand ( Func < IRedisTypedClient < T > , bool > command , Action < bool > onSuccessCallback , Action < Exception > onErrorCallback )
9497 {
95- BeginQueuedCommand ( new QueuedRedisOperation
98+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
9699 {
100+ BoolReturnCommand = command ,
97101 OnSuccessBoolCallback = onSuccessCallback ,
98102 OnErrorCallback = onErrorCallback
99103 } ) ;
@@ -113,8 +117,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, double> command, Action<doub
113117
114118 public void QueueCommand ( Func < IRedisTypedClient < T > , double > command , Action < double > onSuccessCallback , Action < Exception > onErrorCallback )
115119 {
116- BeginQueuedCommand ( new QueuedRedisOperation
120+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
117121 {
122+ DoubleReturnCommand = command ,
118123 OnSuccessDoubleCallback = onSuccessCallback ,
119124 OnErrorCallback = onErrorCallback
120125 } ) ;
@@ -134,8 +139,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, byte[]> command, Action<byte
134139
135140 public void QueueCommand ( Func < IRedisTypedClient < T > , byte [ ] > command , Action < byte [ ] > onSuccessCallback , Action < Exception > onErrorCallback )
136141 {
137- BeginQueuedCommand ( new QueuedRedisOperation
142+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
138143 {
144+ BytesReturnCommand = command ,
139145 OnSuccessBytesCallback = onSuccessCallback ,
140146 OnErrorCallback = onErrorCallback
141147 } ) ;
@@ -155,8 +161,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, string> command, Action<stri
155161
156162 public void QueueCommand ( Func < IRedisTypedClient < T > , string > command , Action < string > onSuccessCallback , Action < Exception > onErrorCallback )
157163 {
158- BeginQueuedCommand ( new QueuedRedisOperation
164+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
159165 {
166+ StringReturnCommand = command ,
160167 OnSuccessStringCallback = onSuccessCallback ,
161168 OnErrorCallback = onErrorCallback
162169 } ) ;
@@ -175,8 +182,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, T> command, Action<T> onSucc
175182
176183 public void QueueCommand ( Func < IRedisTypedClient < T > , T > command , Action < T > onSuccessCallback , Action < Exception > onErrorCallback )
177184 {
178- BeginQueuedCommand ( new QueuedRedisOperation
185+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
179186 {
187+ ObjectReturnCommand = command ,
180188 OnSuccessTypeCallback = x => onSuccessCallback ( JsonSerializer . DeserializeFromString < T > ( x ) ) ,
181189 OnErrorCallback = onErrorCallback
182190 } ) ;
@@ -196,8 +204,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, byte[][]> command, Action<by
196204
197205 public void QueueCommand ( Func < IRedisTypedClient < T > , byte [ ] [ ] > command , Action < byte [ ] [ ] > onSuccessCallback , Action < Exception > onErrorCallback )
198206 {
199- BeginQueuedCommand ( new QueuedRedisOperation
207+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
200208 {
209+ MultiBytesReturnCommand = command ,
201210 OnSuccessMultiBytesCallback = onSuccessCallback ,
202211 OnErrorCallback = onErrorCallback
203212 } ) ;
@@ -217,8 +226,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, List<string>> command, Actio
217226
218227 public void QueueCommand ( Func < IRedisTypedClient < T > , List < string > > command , Action < List < string > > onSuccessCallback , Action < Exception > onErrorCallback )
219228 {
220- BeginQueuedCommand ( new QueuedRedisOperation
229+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
221230 {
231+ MultiStringReturnCommand = command ,
222232 OnSuccessMultiStringCallback = onSuccessCallback ,
223233 OnErrorCallback = onErrorCallback
224234 } ) ;
@@ -237,8 +247,9 @@ public void QueueCommand(Func<IRedisTypedClient<T>, List<T>> command, Action<Lis
237247
238248 public void QueueCommand ( Func < IRedisTypedClient < T > , List < T > > command , Action < List < T > > onSuccessCallback , Action < Exception > onErrorCallback )
239249 {
240- BeginQueuedCommand ( new QueuedRedisOperation
250+ BeginQueuedCommand ( new QueuedRedisTypedCommand < T >
241251 {
252+ MultiObjectReturnCommand = command ,
242253 OnSuccessMultiTypeCallback = x => onSuccessCallback ( x . ConvertAll ( y => JsonSerializer . DeserializeFromString < T > ( y ) ) ) ,
243254 OnErrorCallback = onErrorCallback
244255 } ) ;
0 commit comments