예제 #1
0
        /// <summary>
        /// Start up the user manager
        /// </summary>
        /// <param name="inventoryService"></param>
        protected virtual void StartupUserServerModules()
        {
            m_log.Info("[STARTUP]: Establishing data connection");

            //we only need core components so we can request them from here
            IInterServiceInventoryServices inventoryService;

            TryGet <IInterServiceInventoryServices>(out inventoryService);

            CommunicationsManager commsManager = new UserServerCommsManager(inventoryService);

            //setup database access service, for now this has to be created before the other modules.
            m_userDataBaseService = new UserDataBaseService(commsManager);
            m_userDataBaseService.Initialise(this);

            //TODO: change these modules so they fetch the databaseService class in the PostInitialise method
            m_userManager = new UserManager(m_userDataBaseService);
            m_userManager.Initialise(this);

            m_avatarAppearanceModule = new UserServerAvatarAppearanceModule(m_userDataBaseService);
            m_avatarAppearanceModule.Initialise(this);

            m_friendsModule = new UserServerFriendsModule(m_userDataBaseService);
            m_friendsModule.Initialise(this);

            m_consoleCommandModule = new UserServerCommandModule();
            m_consoleCommandModule.Initialise(this);

            m_messagesService = new MessageServersConnector();
            m_messagesService.Initialise(this);

            m_gridInfoService = new GridInfoServiceModule();
            m_gridInfoService.Initialise(this);
        }