Ejemplo n.º 1
0
        public static void Run(string[] args)
        {
            ChatContext        = new ChatDbContext("db://localhost:3306");
            ChatUserController = new ChatUserController(ChatContext.ChatUsers);
            ChatRoomController = new ChatRoomController(ChatContext.ChatRooms);

            while (Running)
            {
                throw new NotImplementedException();
            }
        }
Ejemplo n.º 2
0
        public static void Attach(string id, ChatConnectionHandler client, AccountChatView account)
        {
            ChatUserController controller = null;

            lock (_lock) {
                if (!Players.TryGetValue(id, out controller))
                {
                    Players[id] = controller = new ChatUserController(account);
                }

                client.Controller = controller;
            }

            if (controller != null)
            {
                controller.Initialize(client);
            }
        }
Ejemplo n.º 3
0
 public static bool Get(string id, out ChatUserController controller)
 {
     lock (_lock) {
         return(Players.TryGetValue(id, out controller));
     }
 }