Пример #1
0
 public async Task HandleAsync(ISaleDeleted @event, ICorrelationContext correlationContext)
 => await _transactionBuilderFactory.Create()
 .Add <DeleteOrphanedSaleBasedStockOperationsActivity>()
 .Add <RepeatIfRequiredActivity>()
 .SetVariables(new SaleIdParameters {
     SaleId = @event.Id, SourceEvent = @event
 })
 .StartAsync();
Пример #2
0
 public async Task HandleAsync(IProductDeleted @event, ICorrelationContext correlationContext)
 => await _transactionBuilderFactory.Create()
 .Add <DeleteOrphanedOffersActivity>()
 .Add <RepeatIfRequiredActivity>()
 .SetVariables(new ProductIdParameters()
 {
     ProductId = @event.Id, SourceEvent = @event
 })
 .StartAsync();
 public async Task HandleAsync(IAuthenticationMeansDeleted @event, ICorrelationContext correlationContext)
 => await _transactionBuilderFactory.Create()
 .Add <DeleteOrphanedAssignmentsToPointOfSaleActivity>()
 .Add <DeleteOrphanedAssignmentsToUserActivity>()
 .Add <RepeatIfRequiredActivity>()
 .SetVariables(new AuthenticationMeansIdParameters {
     AuthenticationMeansId = @event.Id, SourceEvent = @event
 })
 .StartAsync();
Пример #4
0
 public async Task HandleAsync(IDatabaseCreated @event, ICorrelationContext correlationContext)
 {
     await _factory.Create()
     .Add <RepeatFailedInitializationActivity>()
     .Add <CreateUserActivity>()
     .Add <CreatePasswordActivity>()
     .Add <AssignPasswordActivity>()
     .StartAsync();
 }
Пример #5
0
 public async Task HandleAsync(IUserDeleted @event, ICorrelationContext correlationContext)
 => await _transactionBuilderFactory.Create()
 .Add <DeleteOrphanedAccountingGroupAuthorizationsActivity>()
 .Add <DeleteOrphanedPointOfSaleAuthorizationsActivity>()
 .Add <DeleteOrphanedMeansAssignmentsActivity>().SetVariables(new UserIdParameters {
     UserId = @event.Id, SourceEvent = @event
 })
 .Add <RepeatIfRequiredActivity>()
 .StartAsync();
        public async Task <ILongRunningOperationResult> HandleAsync(IHandleCreationOfPointOfSale command, ICorrelationContext correlationContext)
        {
            var transactionBuilder = _transactionBuilderFactory.Create()
                                     .Add <CreationActivity>()
                                     .Add <OwnershipAssignmentActivity>()
                                     .SetVariables(command);

            return(new LongRunningOperationResult(await transactionBuilder.StartAsync()));
        }