Ejemplo n.º 1
0
 public Task <Robot?> GetAsync(Guid id)
 {
     return(ManagerInvoker.Current.InvokeAsync(this, async() =>
     {
         ExecutionContext.Current.OperationType = OperationType.Read;
         Cleaner.CleanUp(id);
         id.Validate(nameof(id)).Mandatory().Run().ThrowOnError();
         return Cleaner.Clean(await _dataService.GetAsync(id).ConfigureAwait(false));
     }));
 }
Ejemplo n.º 2
0
 public async Task <Robot?> GetAsync(Guid id) => await ManagerInvoker.Current.InvokeAsync(this, async() =>
 {
     Cleaner.CleanUp(id);
     await id.Validate(nameof(id)).Mandatory().RunAsync(throwOnError: true).ConfigureAwait(false);
     return(Cleaner.Clean(await _dataService.GetAsync(id).ConfigureAwait(false)));
 }, BusinessInvokerArgs.Read).ConfigureAwait(false);