@@ -195,83 +195,83 @@ public static Task SendLambdaCommandAsync<T1, T2, T3, T4, T5, T6, T7>(this IComm
195195 /// Executes specified lambda function like it was performed by any regular command handler.
196196 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
197197 /// </summary>
198- public static Task SendLambdaCommandAsync < TResult > ( this ICommandBus commandBus , Func < Task < TResult > > query ,
198+ public static async Task < TResult > SendLambdaCommandAsync < TResult > ( this ICommandBus commandBus , Func < Task < TResult > > query ,
199199 CancellationToken cancellationToken = default ( CancellationToken ) )
200200 {
201- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
201+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
202202 }
203203
204204 /// <summary>
205205 /// Executes specified lambda function like it was performed by any regular command handler.
206206 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
207207 /// </summary>
208- public static Task SendLambdaCommandAsync < TResult , T1 > ( this ICommandBus commandBus , Func < T1 , Task < TResult > > query ,
208+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 > ( this ICommandBus commandBus , Func < T1 , Task < TResult > > query ,
209209 CancellationToken cancellationToken = default ( CancellationToken ) )
210210 {
211- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
211+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
212212 }
213213
214214 /// <summary>
215215 /// Executes specified lambda function like it was performed by any regular command handler.
216216 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
217217 /// </summary>
218- public static Task SendLambdaCommandAsync < TResult , T1 , T2 > ( this ICommandBus commandBus , Func < T1 , T2 , Task < TResult > > query ,
218+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 > ( this ICommandBus commandBus , Func < T1 , T2 , Task < TResult > > query ,
219219 CancellationToken cancellationToken = default ( CancellationToken ) )
220220 {
221- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
221+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
222222 }
223223
224224 /// <summary>
225225 /// Executes specified lambda function like it was performed by any regular command handler.
226226 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
227227 /// </summary>
228- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 > ( this ICommandBus commandBus , Func < T1 , T2 , T3 , Task < TResult > > query ,
228+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 > ( this ICommandBus commandBus , Func < T1 , T2 , T3 , Task < TResult > > query ,
229229 CancellationToken cancellationToken = default ( CancellationToken ) )
230230 {
231- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
231+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
232232 }
233233
234234 /// <summary>
235235 /// Executes specified lambda function like it was performed by any regular command handler.
236236 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
237237 /// </summary>
238- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 > ( this ICommandBus commandBus , Func < T1 , T2 , T3 , T4 , Task < TResult > > query ,
238+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 > ( this ICommandBus commandBus , Func < T1 , T2 , T3 , T4 , Task < TResult > > query ,
239239 CancellationToken cancellationToken = default ( CancellationToken ) )
240240 {
241- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
241+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
242242 }
243243
244244 /// <summary>
245245 /// Executes specified lambda function like it was performed by any regular command handler.
246246 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
247247 /// </summary>
248- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 > ( this ICommandBus commandBus ,
248+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 > ( this ICommandBus commandBus ,
249249 Func < T1 , T2 , T3 , T4 , T5 , Task < TResult > > query ,
250250 CancellationToken cancellationToken = default ( CancellationToken ) )
251251 {
252- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
252+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
253253 }
254254
255255 /// <summary>
256256 /// Executes specified lambda function like it was performed by any regular command handler.
257257 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
258258 /// </summary>
259- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 > ( this ICommandBus commandBus ,
259+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 > ( this ICommandBus commandBus ,
260260 Func < T1 , T2 , T3 , T4 , T5 , T6 , Task < TResult > > query ,
261261 CancellationToken cancellationToken = default ( CancellationToken ) )
262262 {
263- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
263+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
264264 }
265265
266266 /// <summary>
267267 /// Executes specified lambda function like it was performed by any regular command handler.
268268 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
269269 /// </summary>
270- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 , T7 > ( this ICommandBus commandBus ,
270+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 , T7 > ( this ICommandBus commandBus ,
271271 Func < T1 , T2 , T3 , T4 , T5 , T6 , T7 , Task < TResult > > query ,
272272 CancellationToken cancellationToken = default ( CancellationToken ) )
273273 {
274- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
274+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , cancellationToken ) ;
275275 }
276276
277277 #endregion
@@ -282,93 +282,93 @@ public static Task SendLambdaCommandAsync<TResult, T1, T2, T3, T4, T5, T6, T7>(t
282282 /// Executes specified lambda function like it was performed by any regular command handler.
283283 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
284284 /// </summary>
285- public static Task SendLambdaCommandAsync < TResult > ( this ICommandBus commandBus , Func < Task < TResult > > query ,
285+ public static async Task < TResult > SendLambdaCommandAsync < TResult > ( this ICommandBus commandBus , Func < Task < TResult > > query ,
286286 CommandExecutionOptions executionOptions ,
287287 CancellationToken cancellationToken = default ( CancellationToken ) )
288288 {
289- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
289+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
290290 }
291291
292292 /// <summary>
293293 /// Executes specified lambda function like it was performed by any regular command handler.
294294 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
295295 /// </summary>
296- public static Task SendLambdaCommandAsync < TResult , T1 > ( this ICommandBus commandBus , Func < T1 , Task < TResult > > query ,
296+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 > ( this ICommandBus commandBus , Func < T1 , Task < TResult > > query ,
297297 CommandExecutionOptions executionOptions ,
298298 CancellationToken cancellationToken = default ( CancellationToken ) )
299299 {
300- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
300+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
301301 }
302302
303303 /// <summary>
304304 /// Executes specified lambda function like it was performed by any regular command handler.
305305 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
306306 /// </summary>
307- public static Task SendLambdaCommandAsync < TResult , T1 , T2 > ( this ICommandBus commandBus , Func < T1 , T2 , Task < TResult > > query ,
307+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 > ( this ICommandBus commandBus , Func < T1 , T2 , Task < TResult > > query ,
308308 CommandExecutionOptions executionOptions ,
309309 CancellationToken cancellationToken = default ( CancellationToken ) )
310310 {
311- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
311+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
312312 }
313313
314314 /// <summary>
315315 /// Executes specified lambda function like it was performed by any regular command handler.
316316 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
317317 /// </summary>
318- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 > ( this ICommandBus commandBus ,
318+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 > ( this ICommandBus commandBus ,
319319 Func < T1 , T2 , T3 , Task < TResult > > query ,
320320 CommandExecutionOptions executionOptions ,
321321 CancellationToken cancellationToken = default ( CancellationToken ) )
322322 {
323- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
323+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
324324 }
325325
326326 /// <summary>
327327 /// Executes specified lambda function like it was performed by any regular command handler.
328328 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
329329 /// </summary>
330- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 > ( this ICommandBus commandBus ,
330+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 > ( this ICommandBus commandBus ,
331331 Func < T1 , T2 , T3 , T4 , Task < TResult > > query ,
332332 CommandExecutionOptions executionOptions ,
333333 CancellationToken cancellationToken = default ( CancellationToken ) )
334334 {
335- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
335+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
336336 }
337337
338338 /// <summary>
339339 /// Executes specified lambda function like it was performed by any regular command handler.
340340 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
341341 /// </summary>
342- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 > ( this ICommandBus commandBus ,
342+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 > ( this ICommandBus commandBus ,
343343 Func < T1 , T2 , T3 , T4 , T5 , Task < TResult > > query ,
344344 CommandExecutionOptions executionOptions ,
345345 CancellationToken cancellationToken = default ( CancellationToken ) )
346346 {
347- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
347+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
348348 }
349349
350350 /// <summary>
351351 /// Executes specified lambda function like it was performed by any regular command handler.
352352 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
353353 /// </summary>
354- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 > ( this ICommandBus commandBus ,
354+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 > ( this ICommandBus commandBus ,
355355 Func < T1 , T2 , T3 , T4 , T5 , T6 , Task < TResult > > query ,
356356 CommandExecutionOptions executionOptions ,
357357 CancellationToken cancellationToken = default ( CancellationToken ) )
358358 {
359- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
359+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
360360 }
361361
362362 /// <summary>
363363 /// Executes specified lambda function like it was performed by any regular command handler.
364364 /// This includes scoped resolution of its parameter dependencies, committing the unit of work, etc.
365365 /// </summary>
366- public static Task SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 , T7 > ( this ICommandBus commandBus ,
366+ public static async Task < TResult > SendLambdaCommandAsync < TResult , T1 , T2 , T3 , T4 , T5 , T6 , T7 > ( this ICommandBus commandBus ,
367367 Func < T1 , T2 , T3 , T4 , T5 , T6 , T7 , Task < TResult > > query ,
368368 CommandExecutionOptions executionOptions ,
369369 CancellationToken cancellationToken = default ( CancellationToken ) )
370370 {
371- return commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
371+ return ( TResult ) await commandBus . SendAsync ( new LambdaResultCommand ( query , typeof ( TResult ) ) , executionOptions , cancellationToken ) ;
372372 }
373373
374374 #endregion
0 commit comments