Ejemplo n.º 1
0
        public static async Task Seed(IPriorityQueryRepository repository)
        {
            if (!await repository.Any())
            {
                await repository.Add(new PriorityDto()
                {
                    Id = PriorityConstants.Lowest, Name = "Lowest"
                });

                await repository.Add(new PriorityDto()
                {
                    Id = PriorityConstants.Low, Name = "Low"
                });

                await repository.Add(new PriorityDto()
                {
                    Id = PriorityConstants.Medium, Name = "Medium"
                });

                await repository.Add(new PriorityDto()
                {
                    Id = PriorityConstants.High, Name = "High"
                });

                await repository.Add(new PriorityDto()
                {
                    Id = PriorityConstants.Highest, Name = "Highest"
                });
            }
        }
 public TicketPriorityEventHandler(ITicketQueryRepository ticketRepository, IPriorityQueryRepository priorityRepository, ITicketEventQueryRepository eventRepository, IMapper mapper, IWebsocketEmittor websocketEmittor)
 {
     _ticketRepository   = ticketRepository ?? throw new ArgumentNullException(nameof(ticketRepository));
     _priorityRepository = priorityRepository ?? throw new ArgumentNullException(nameof(priorityRepository));
     _eventRepository    = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository));
     _mapper             = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _websocketEmittor   = websocketEmittor ?? throw new ArgumentNullException(nameof(websocketEmittor));
 }
Ejemplo n.º 3
0
 public TicketCreateEventHandler(ITicketQueryRepository ticketRepository, ITicketEventQueryRepository eventRepository, IMapper mapper, IWebsocketEmittor websocketEmittor,
                                 IIntegrationEventPublisher eventPublisher, IPriorityQueryRepository priorityRepository, IStatusQueryRepository statusRepository)
 {
     _ticketRepository   = ticketRepository ?? throw new ArgumentNullException(nameof(ticketRepository));
     _priorityRepository = priorityRepository ?? throw new ArgumentNullException(nameof(priorityRepository));
     _statusRepository   = statusRepository ?? throw new ArgumentNullException(nameof(statusRepository));
     _eventRepository    = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository));
     _websocketEmittor   = websocketEmittor ?? throw new ArgumentNullException(nameof(websocketEmittor));
     _mapper             = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _eventPublisher     = eventPublisher ?? throw new ArgumentNullException(nameof(eventPublisher));
 }
Ejemplo n.º 4
0
 public PriorityAllQueryHandler(IPriorityQueryRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }