public StateReport(State state, ICommonWriter <Message> commonWriter, ICommonWriter <Entity> commonWriter2, ConnectionsFactory connectionsFactory) { ConsistanceOrders = state.ConsistanceOrders.Count; foreach (string key in state.Collectors.Keys.ToArray()) { if (state.Collectors.TryGetValue(key, out var val)) { CollectorsCount += val.Count; foreach (var coll in val) { Collectors.Add(new CollectorReport() { Phone = coll.Phone, Group = key }); } } } Messages = commonWriter.GetQueueCount(); TotalConnections = connectionsFactory.TotalConnections; ConnectionsHotReserve = connectionsFactory.HotReserve; ExecutingOrdersJournal = state.ExecutingOrdersJournal; Orders = state.CountOrders(); TargetOrders = state.CountTargetOrders(); }
public OrderBoardService(State ordersStorage, ICommonWriter commonWriter, ICommonWriter <Message> messagesWriter, ICommonWriter <Entity> entitiesWriter, ICommonReader <ChatInfo> commonReader, ChatInfoLoader chatInfoLoader) { this.ordersStorage = ordersStorage; this.commonWriter = commonWriter; this.entitiesWriter = entitiesWriter; this.messagesWriter = messagesWriter; this.commonReader = commonReader; this.chatInfoLoader = chatInfoLoader; }
public GrpcDataReciever(IGrpcSettings grpcSettings, ICommonWriter <Message> commonWriter, ChatInfoLoaderClient chatInfoLoader) { this.grpcSettings = grpcSettings; this.commonWriter = commonWriter; this.chatInfoLoader = chatInfoLoader; }
public ChatInfoLoaderClient(IGrpcSettings grpcSettings, ICommonWriter <Entity> commonWriter) { this.grpcSettings = grpcSettings; this.commonWriter = commonWriter; }
public LoadManager(ICommonWriter <Message> commonWriter) { this.commonWriter = commonWriter; }