public async Task NotifyAsync(IMediatorComponent sender, IMediationEvent @event) { InitializeComponents(); // each of these event handling stuff is usually moved to their own event handlers // in libraries like https://github.com/jbogard/MediatR/wiki if (@event is UserDeletionEvent userDeletionEvent) { await _orderService.DeleteOrdersAsync(userDeletionEvent.UserId); } else if (@event is OrderCompletionEvent orderCompletionEvent) { await _userService.IncreaseReputationAsync(orderCompletionEvent.UserId); } }
public PrimaryMessageActor(IMediatorComponent mediator) : base(mediator) { }
public SecondaryMessageActor(IMediatorComponent mediator) : base(mediator) { }
protected MessageActor(IMediatorComponent mediator) { m_mediatorComponent = mediator; m_mediatorComponent.MessageActivatedEvent += MessageRecevie; }