public void UpdateMailbox(string newMailbox) { var agentMailboxUpdatedEvent = new AgentMailboxUpdatedEvent() { Agent = this }; this.AddDomainEvent(agentMailboxUpdatedEvent); }
public async Task Handle(AgentMailboxUpdatedEvent agentMailboxUpdatedEvent, CancellationToken cancellationToken) { await Processor(agentMailboxUpdatedEvent.Agent); logger.CreateLogger(nameof(agentMailboxUpdatedEvent)).LogTrace($"Agent mailbox created for {agentMailboxUpdatedEvent.Agent.Id}."); }