Beispiel #1
0
        }                                                                          //Ключ - номер комнаты

        #endregion Properties

        #region Constructors

        public HandlerMessage(ITransportServer server, IHandlerRequestFromClient handlerRequestFromClient, IHandlerRequestToData data, HandlerConnection connection, HandlerChat chats)
        {
            _server = server;
            handlerRequestFromClient.MessageReceived += OnMessage;
            handlerRequestFromClient.ConnectedToChat += OnChatOpened;

            _data          = data;
            MessagesAtChat = _data.GetAllMessageFromChats();

            _connection = connection;
            _chats      = chats;
        }
Beispiel #2
0
        }                                                            //Ключ - номер комнаты

        #endregion Properties

        #region Constructors

        public HandlerChat(ITransportServer server, IHandlerRequestFromClient handlerRequestFromClient, IHandlerRequestToData data, HandlerConnection connection)
        {
            _server = server;

            handlerRequestFromClient.AddedChat              += OnAddedChat;
            handlerRequestFromClient.RemovedChat            += OnRemovedChat;
            handlerRequestFromClient.AddedClientsToChat     += OnAddedClientsToChat;
            handlerRequestFromClient.RemovedClientsFromChat += OnRemovedClientsFromChat;
            handlerRequestFromClient.RequestNumbersChats    += OnRequestNumbersChats;

            _data = data;
            _cachedClientProperies = _data.GetInfoAboutLinkClientToChat();
            InfoChats   = _data.GetInfoAboutAllChat();
            _connection = connection;
        }