Esempio n. 1
0
        public PlanetController(ISessionManager sessionManager, IPlanets planetRespository, ISolarSystems solarSystemRepository, IRaces races)
        {
            if (sessionManager == null) throw new ArgumentNullException(nameof(sessionManager));
            if (solarSystemRepository == null) throw new ArgumentNullException(nameof(solarSystemRepository));
            if (races == null) throw new ArgumentNullException(nameof(races));
            if (planetRespository == null) throw new ArgumentNullException(nameof(planetRespository));

            _sessionManager = sessionManager;
            _solarSystemRepository = solarSystemRepository;
            _races = races;
            _planetRespository = planetRespository;
        }
Esempio n. 2
0
        public SolarSystemController(ISessionManager sessionManager, INavigationManager navigationManager, ISecurityManager securityManager, IPlanets planets)
        {
            if (sessionManager == null) throw new ArgumentNullException(nameof(sessionManager));
            if (navigationManager == null) throw new ArgumentNullException(nameof(navigationManager));
            if (securityManager == null) throw new ArgumentNullException(nameof(securityManager));
            if (planets == null) throw new ArgumentNullException(nameof(planets));

            _sessionManager = sessionManager;
            _navigationManager = navigationManager;
            _securityManager = securityManager;
            _planets = planets;
        }
Esempio n. 3
0
 public AsyncPlanets(IPlanets inner)
 {
     _inner = inner;
 }
Esempio n. 4
0
 public SolarSystems(ISessionManager sessionManager, IPlanets planets)
     : base(sessionManager)
 {
     if (planets == null) throw new ArgumentNullException("planets");
     _planets = planets;
 }
Esempio n. 5
0
 public static SolarSystems SolarSystems(ISessionManager sessionManager = null, IPlanets planets = null)
 {
     return new SolarSystems(sessionManager ?? Mock.Of<ISessionManager>(),
                     planets ?? Mock.Of<IPlanets>());
 }