public Task Handle(EmpireQueueCreatedEvent @event) { var empireQueue = new EmpireQueue { Id = @event.EmpireQueue.Id, TicketCategoryId = @event.EmpireQueue.TicketCategoryId }; _unitOfWork.EmpireQueues.Create(empireQueue); return(Task.CompletedTask); }
public Task Handle(EmpireQueueCreatedEvent @event) { var empireQueue = new EmpireQueue { Id = @event.EmpireQueue.Id, Name = @event.EmpireQueue.Name, QueueWeight = @event.EmpireQueue.QueueWeight, ActiveWaitersCount = @event.EmpireQueue.ActiveWaitersCount }; _unitOfWork.EmpireQueues.Create(empireQueue); _unitOfWork.BroadcastServerEvent("empire-queue-created", empireQueue); return(Task.CompletedTask); }
public Task <bool> Handle(CreateEmpireQueueCommand request, CancellationToken cancellationToken) { var empireQueue = new EmpireQueue { TicketCategoryId = request.TicketCategory.Id, QueueWeight = request.TicketCategory.PriorityCoefficient, ActiveWaitersCount = 0, Name = request.TicketCategory.Name }; _unitOfWork.EmpireQueues.Create(empireQueue); _bus.Publish(new EmpireQueueCreatedEvent(empireQueue)); return(Task.FromResult(true)); }
public EmpireQueueDeletedEvent(EmpireQueue empireQueue) { EmpireQueue = empireQueue; }
public EmpireQueueUpdatedEvent(EmpireQueue empireQueue) { EmpireQueue = empireQueue; }
private void StartUpdateEmpireQueueCommand(EmpireQueue empireQueue) { var updateEmpireQueueCommand = new UpdateEmpireQueueCommand(empireQueue); _unitOfWork.SourceEvent(updateEmpireQueueCommand); }
public EmpireQueueCreatedEvent(EmpireQueue empireQueue) { EmpireQueue = empireQueue; }
public UpdateEmpireQueueCommand(EmpireQueue empireQueue) { EmpireQueue = empireQueue; }