Ejemplo n.º 1
0
        public BluffinLobbyWorker(IBluffinServer server, IBluffinLobby lobby)
        {
            Server    = server;
            Lobby     = lobby;
            m_Methods = new[]
            {
                //General
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(DisconnectCommand), OnDisconnectCommandReceived),

                //Lobby
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(ListTableCommand), OnListTableCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(CheckCompatibilityCommand), OnCheckCompatibilityCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(JoinTableCommand), OnJoinTableCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(LeaveTableCommand), OnLeaveTableCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(CreateTableCommand), OnCreateTableCommandReceived),

                //Lobby QuickMode
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(IdentifyCommand), OnIdentifyCommandReceived),

                //Lobby RegisteredMode
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(CheckDisplayExistCommand), OnCheckDisplayExistCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(CheckUserExistCommand), OnCheckUserExistCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(CreateUserCommand), OnCreateUserCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(AuthenticateUserCommand), OnAuthenticateUserCommandReceived),
                new KeyValuePair <Type, Action <AbstractCommand, IBluffinClient> >(typeof(GetUserCommand), OnGetUserCommandReceived)
            };
        }
        public BluffinLobbyWorker(IBluffinServer server, IBluffinLobby lobby)
        {
            Server = server;
            Lobby = lobby;
            m_Methods = new[]
            {
                //General
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(AbstractBluffinCommand), OnCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(DisconnectCommand), OnDisconnectCommandReceived), 
                
                //Lobby
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(ListTableCommand), OnListTableCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(CheckCompatibilityCommand), OnCheckCompatibilityCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(JoinTableCommand), OnJoinTableCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(LeaveTableCommand), OnLeaveTableCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(CreateTableCommand), OnCreateTableCommandReceived), 
                
                //Lobby QuickMode
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(IdentifyCommand), OnIdentifyCommandReceived), 

                //Lobby RegisteredMode
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(CheckDisplayExistCommand), OnCheckDisplayExistCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(CheckUserExistCommand), OnCheckUserExistCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(CreateUserCommand), OnCreateUserCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(AuthenticateUserCommand), OnAuthenticateUserCommandReceived), 
                new KeyValuePair<Type, Action<AbstractBluffinCommand, IBluffinClient>>(typeof(GetUserCommand), OnGetUserCommandReceived)
                
            };
        }