Пример #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();

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

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

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

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

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

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

            m_gridInfoService = new GridInfoServiceModule();
            m_gridInfoService.Initialize(this);
        }
 public UserServerEventDispatchModule(UserManager userManager, MessageServersConnector messagesService, UserLoginService loginService)
 {
     m_userManager = userManager;
     m_messagesService = messagesService;
     m_loginService = loginService;
 }