Exemple #1
0
        // DI Container enabled
//        public ConnectionHub() : this(UserConnectionManager.Instance, GameManager.Instance, new CookieService()) { }

        public ConnectionHub(/*UserConnectionManager connectionManager, GameManager gameManager, ICookieService cookieService*/
            ILifetimeScope scope)
        {
            _connectionManager = scope.Resolve <UserConnectionManager>(); // connectionManager;
            _gameManager       = scope.Resolve <GameManager>();           //gameManager;
            _cookieService     = scope.Resolve <ICookieService>();        //cookieService;
        }
Exemple #2
0
        // DI Container enabled
        //public GameHub() : this(GameManager.Instance, UserConnectionManager.Instance, new CookieService()) { }

        public GameHub(ILifetimeScope scope)
        {
            _connectionManager = scope.Resolve <UserConnectionManager>(); // connectionManager;
            _gameManager       = scope.Resolve <GameManager>();           //gameManager;
            _cookieService     = scope.Resolve <ICookieService>();        //cookieService;
        }