Пример #1
0
        public async Task <ToDoItem> GetByIdAsync(int id)
        {
            var meta = new SafeCallServiceLogMetadata(
                this.headerAccessor.CorrelationId,
                typeof(ToDoRepository),
                nameof(this.GetByIdAsync));

            var command = new SafeCallServiceQuery <ToDoItem>(
                this.SimulatedDbCall,
                meta);

            return(await this.safeCallService.CallAsync(command));
        }
 public void Construct_Successfully()
 {
     this.Metadata = new SafeCallServiceLogMetadata(Guid.NewGuid(), typeof(SafeCallServiceCommandUnitTests), "Unit Test");
     this.Command  = new SafeCallServiceCommand(() => Task.CompletedTask, this.Metadata);
 }
Пример #3
0
 public void Construct_Successfully()
 {
     this.Metadata = new SafeCallServiceLogMetadata(Guid.NewGuid(), typeof(SafeCallServiceQueryUnitTests), "Unit Tests");
     this.Query    = new SafeCallServiceQuery <string>(() => Task.FromResult("Success"), this.Metadata);
 }
 public void Constuct_Successfully()
 {
     this.Metadata = new SafeCallServiceLogMetadata(Guid.NewGuid(), typeof(SafeCallServiceLogMetadataUnitTests), "Unit Tests");
 }