public UserProfileController(ICurrentUser user, IUnitOfWork uow, IMapper mapper, IGameEngineService gameEngine)
 {
     this.user       = user;
     this.uow        = uow;
     this.mapper     = mapper;
     this.gameEngine = gameEngine;
 }
 public static EntityBag Create <T1, T2, T3>(IGameEngineService gameEngine)
     where T1 : class, IComponent
     where T2 : class, IComponent
     where T3 : class, IComponent
 {
     return(new EntityBag(gameEngine, new GenericComponentFilter <T1, T2, T3>()));
 }
 private EntityBag(IGameEngineService engineService, IComponentFilter componentFilter)
 {
     Filter         = componentFilter;
     _engineService = engineService;
     OnEngineChanged(this, new EngineChangedEventArgs(engineService.Engine));
     engineService.EngineChanged += OnEngineChanged;
     engineService.EngineEvent   += OnEngineEvent;
 }
Пример #4
0
 public GameHub(
     IGroupStore groupStore,
     IPlayerStore playerStore,
     IGameEngineService gameEngineService)
 {
     _groupStore        = groupStore ?? throw new ArgumentNullException(nameof(groupStore));
     _playerStore       = playerStore ?? throw new ArgumentNullException(nameof(playerStore));
     _gameEngineService = gameEngineService ?? throw new ArgumentNullException(nameof(gameEngineService));
 }
 public UserAdministrationController(ApplicationUserManager userManager,
                                     RoleManager <IdentityRole> roleManager,
                                     IUnitOfWork uow,
                                     IGameEngineService gameEngine,
                                     IRazorEngineService razor,
                                     IMapper mapper)
 {
     this.userManager = userManager;
     this.roleManager = roleManager;
     this.uow         = uow;
     this.gameEngine  = gameEngine;
     this.razor       = razor;
     this.mapper      = mapper;
     log = LogManager.GetCurrentClassLogger();
 }
        IKernel BuildNinjectKernel(IIdentity identity, string userId, IGameEngineService rulesService)
        {
            var     requestUserId = userId;
            IKernel kernel        = new StandardKernel();

            kernel.Bind <IUnitOfWork>().ToMethod(u => UnitOfWork);
            kernel.Bind <ICurrentUser>().ToMethod(u => new FakeCurrentUser(identity, requestUserId));
            kernel.Bind <TController>().ToSelf().InTransientScope();
            kernel.Bind <IGameEngineService>().ToMethod(u => rulesService).InTransientScope();
            kernel.Bind <IGameNotificationService>().To <FakeNotificationService>().InTransientScope();
            kernel.Bind <IImageStore>().ToMethod(u => ImageStore).InTransientScope().Named("BadgeImageStore");
            kernel.Bind <IImageStore>().ToMethod(u => ImageStore).InTransientScope().Named("ValidationImageStore");
            kernel.Bind <IImageStore>().ToMethod(u => ImageStore).InTransientScope().Named("StaticImageStore");
            var mapperConfig = new MapperConfiguration(cfg => cfg.AddProfile <ViewModelMappingProfile>());

            kernel.Bind <IMapper>().ToMethod(m => mapperConfig.CreateMapper()).InTransientScope();
            return(kernel);
        }
Пример #7
0
 public GameEngineTickSystem(IGameEngineService gameEngineService)
 {
     _gameEngineService = gameEngineService;
 }
Пример #8
0
 public DummyGameController(IGameEngineService gameEngine)
 {
     this.gameEngine = gameEngine;
 }
Пример #9
0
 public App(IGameEngineService engine)
 {
     _engine = engine;
 }
Пример #10
0
 public ModerationController(IUnitOfWork uow, IGameEngineService gameEngine, IGameNotificationService notifier)
 {
     this.uow        = uow;
     this.gameEngine = gameEngine;
     this.notifier   = notifier;
 }
 public MissionsController(IUnitOfWork uow, IGameEngineService gameEngine)
 {
     this.uow        = uow;
     this.gameEngine = gameEngine;
 }
Пример #12
0
 public UnitRenderSystem(SdlMainWindow sdlWindow, IGameEngineService gameEngineService)
 {
     _sdlWindow = sdlWindow;
     _unitBag   = EntityBag.Create <ITransform>(gameEngineService);
 }
 public MissionTracksController(IUnitOfWork uow, IGameEngineService gameEngine, IMapper mapper)
 {
     this.uow        = uow;
     this.gameEngine = gameEngine;
     this.mapper     = mapper;
 }
 public MissionLevelsController(IUnitOfWork uow, IMapper mapper, IGameEngineService gameEngine)
 {
     this.uow        = uow;
     this.mapper     = mapper;
     this.gameEngine = gameEngine;
 }