示例#1
0
        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();
        }
示例#2
0
 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;
 }
示例#3
0
 public GrpcDataReciever(IGrpcSettings grpcSettings, ICommonWriter <Message> commonWriter, ChatInfoLoaderClient chatInfoLoader)
 {
     this.grpcSettings   = grpcSettings;
     this.commonWriter   = commonWriter;
     this.chatInfoLoader = chatInfoLoader;
 }
示例#4
0
 public ChatInfoLoaderClient(IGrpcSettings grpcSettings, ICommonWriter <Entity> commonWriter)
 {
     this.grpcSettings = grpcSettings;
     this.commonWriter = commonWriter;
 }
示例#5
0
 public LoadManager(ICommonWriter <Message> commonWriter)
 {
     this.commonWriter = commonWriter;
 }