public DeleteRewardInteractorImpl(Executor taskExecutor, MainThread mainThread, DeleteRewardInteractorCallback callback, RewardRepository rewardRepository, Reward reward) : base(taskExecutor, mainThread) { this.callback = callback; this.rewardRepository = rewardRepository; this.reward = reward; }
public GetAllRewardsInteractorImpl(Executor taskExecutor, MainThread mainThread, GetAllRewardsInteractorCallback callback, RewardRepository rewardRepository, string username) : base(taskExecutor, mainThread) { this.callback = callback; this.rewardRepository = rewardRepository; this.username = username; }
public CreateRewardInteractorImpl(Executor taskExecutor, MainThread mainThread, CreateRewardInteractorCallback callback, RewardRepository rewardRepository, Reward reward, string username) : base(taskExecutor, mainThread) { this.callback = callback; this.rewardRepository = rewardRepository; this.reward = reward; this.username = username; }
public RewardPresenterImpl(Executor executor, MainThread mainThread, RewardView view, RewardRepository rewardRepository, UserRepository userRepository, string username, string password) : base(executor, mainThread) { this.view = view; this.rewardRepository = rewardRepository; this.userRepository = userRepository; this.username = username; this.password = password; }
public BuyRewardInteractorImpl(Executor taskExecutor, MainThread mainThread, BuyRewardInteractorCallback callback, RewardRepository rewardRepository, UserRepository userRepository, Reward reward) : base(taskExecutor, mainThread) { this.callback = callback; this.rewardRepository = rewardRepository; this.userRepository = userRepository; this.reward = reward; }
//private static readonly ILog log = LogManager.GetLogger(typeof(Launcher)); //private List<Loading> list = new List<Loading>(); private void Awake() { GlobalWindowManager windowManager = FindObjectOfType <GlobalWindowManager>(); if (windowManager == null) { throw new NotFoundException("Can't find the GlobalWindowManager."); } //DontDestroyOnLoad(this); ApplicationContext context = ApplicationContext.GetApplicationContext(); IServiceContainer container = context.GetContainer(); /*初始化数据绑定服务*/ BindingServiceBundle bundle = new BindingServiceBundle(context.GetContainer()); bundle.Start(); /* Initialize the ui view locator and register UIViewLocator */ container.Register <IUIViewLocator>(new ResourcesViewLocator()); /*网络消息分析器注册*/ IMessageDispatcher messageDispatcher = new MessageDispatcher(); container.Register <IMessageDispatcher>(messageDispatcher); /*初始化网络连接*/ ISession session = new Session(); container.Register <ISession>(session); //session.Connect("127.0.0.1", 10001); SpriteAtlas spriteAtlas = Resources.Load <SpriteAtlas>("Atlas/Icon"); IConverterRegistry converterRegistry = context.GetContainer().Resolve <IConverterRegistry>(); converterRegistry.Register("spriteConverter", new SpriteConverter(spriteAtlas)); SpriteAtlas merchandiseAtlas = Resources.Load <SpriteAtlas>("Atlas/Merchandise"); converterRegistry.Register("merchandiseConverter", new SpriteConverter(merchandiseAtlas)); SpriteAtlas wheelAtlas = Resources.Load <SpriteAtlas>("Atlas/Wheel"); converterRegistry.Register("wheelConverter", new SpriteConverter(wheelAtlas)); /*初始化定时器*/ ITask taskContext = new TaskContext(); container.Register <ITask>(taskContext); IRewardRepository rewardRepository = new RewardRepository(); container.Register <IRewardRepository>(rewardRepository); }
public HttpResponseMessage PutGetRewardDonor(int donorId) { var reward = RewardRepository.getAvailableRewardsDonor(donorId); // reward.Add(new Reward()); foreach (Reward item in reward) { item.Donors = null; } HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, reward); return(response); }
public GameConsole() { gameState = new GameState { Running = true }; var rewardsRepo = new RewardRepository(@".\Resources\Dat\rewards.csv"); var achievementsRepo = new AchievementRepository(@".\Resources\Dat\achievements.csv", gameState); var gameItemsRepo = new GameItemRepository(@".\Resources\Dat\gameItems.csv"); var storeInventoryRepo = new StoryInventoryRepository(@".\Resources\Dat\storeInventory.csv"); gateway = new DataGateway(rewardsRepo, gameItemsRepo, achievementsRepo, storeInventoryRepo); commandsGroup = new TopCommandGroupFactory().Build(); gameState.Lobby = new LobbyRoom(gameState, new[] { "Welcome to the Lobby" }, GameMode.Lobby, commandsGroup); gameState.Store = gameState.Store ?? new MinerStoreFactory(gameState, commandsGroup, gateway).Build(); gameState.ControlRoom = new ControlRoomFactory(gameState, commandsGroup).Build(); gameState.ClaimsOffice = new ClaimsOfficeRoomFactory(gameState, commandsGroup, gateway).Build(); gameState.SaveDirectory = @"c:\chipMiner\saves"; gameState.GameTime.Start(); IsVisible = true; IsFocused = true; StartGame(); hud = new HudConsole(gameState) { Position = new Point(0, 0) }; input = new InputConsole(this, gameState) { Position = new Point(1, 34) }; output = new OutputConsole(this, 83) { Position = new Point(1, 1) }; events = new GameEventsConsole(this, 83) { Position = new Point(85, 1) }; Children.Add(hud); Children.Add(input); Children.Add(output); Children.Add(events); Global.FocusedConsoles.Set(input); }
public AppearConversationCharacter(PlayerEventModel playerEventModel) : base(playerEventModel) { // TODO : この辺のレポジトリを使いまわしできるようにしたい。 var conversationRepository = new ConversationRepository(ContextMap.DefaultMap); var appearCharacterRepository = new AppearCharacterRepository(ContextMap.DefaultMap); var rewardRepository = new RewardRepository(ContextMap.DefaultMap); Debug.Assert(playerEventModel.EventModel.EventContentsModel.Arg.Length >= 3, "AppearConversationCharacter: コンテンツ引数の要素数が3未満です"); var appearCharacterId = uint.Parse(playerEventModel.EventModel.EventContentsModel.Arg[0]); var conversationId = uint.Parse(playerEventModel.EventModel.EventContentsModel.Arg[1]); var rewardId = uint.Parse(playerEventModel.EventModel.EventContentsModel.Arg[2]); this.appearCharacterModel = appearCharacterRepository.Get(appearCharacterId); this.conversationModel = conversationRepository.Get(conversationId); this.rewardModel = rewardRepository.Get(rewardId); }
public RewardService(RewardRepository rewardRepository) { RewardRepository = rewardRepository; }
public void Reward_with_bad_type_throws_exception() { var rewardRepo = new RewardRepository(@"RepositoryTests\Resources\basic-rewards-bad-type.csv"); Should.Throw <InvalidDataException>(() => rewardRepo.GetAll()); }