public OrderEventProcessor() { ProcessorId = Guid.NewGuid(); _orderEventRepository = new OrderEventRepository(); _timer = new Timer(); Initialize(); }
public LeaderSelection(OrderEventProcessor orderEventProcessor) : base(orderEventProcessor) { Console.WriteLine($"OrderEventProcessor Id: {orderEventProcessor.ProcessorId} become LeaderSelection."); _orderEventRepository = new OrderEventRepository(); _orderEventOutboxRepository = new OrderEventOutboxRepository(); // RegisterAsCandidate(); }
public BasketService(IHttpContextAccessor httpContextAccessor, IEventRepository eventRepository, IOrderEventRepository orderEventRepository) { _httpContextAccessor = httpContextAccessor; _eventRepository = eventRepository; _orderEventRepository = orderEventRepository; }
public Leader(OrderEventProcessor orderEventProcessor) : base(orderEventProcessor) { Console.WriteLine($"OrderEventScheduler: {OrderEventProcessor.ProcessorId} become Leader."); _orderEventRepository = new OrderEventRepository(); _orderEventOutboxRepository = new OrderEventOutboxRepository(); RegisterAsLeader(); }
public Follower(OrderEventProcessor orderEventProcessor) : base(orderEventProcessor) { Console.WriteLine($"OrderEventProcessor :{orderEventProcessor.ProcessorId} state become Follower."); _orderEventRepository = new OrderEventRepository(); _orderEventOutboxRepository = new OrderEventOutboxRepository(); RegisterAsFollower(); }
public Candidate(OrderEventProcessor orderEventProcessor) : base(orderEventProcessor) { Console.WriteLine($"OrderEventProcessor Id: {orderEventProcessor.ProcessorId} become Candidate."); _orderEventRepository = new OrderEventRepository(); _orderEventOutboxRepository = new OrderEventOutboxRepository(); RegisterAsCandidate(); }
public OrderService(IHttpContextAccessor httpContextAccessor, IBasketService basketService, IUserService userService, IEventRepository eventRepository, IBaseOrderRepository baseOrderRepository, IOrderEventRepository orderEventRepository) { _httpContextAccessor = httpContextAccessor; _basketService = basketService; _userService = userService; _eventRepository = eventRepository; _baseOrderRepository = baseOrderRepository; _orderEventRepository = orderEventRepository; }