public SquareView() { InitializeComponent(); boardContainer = Locator.Current.GetService <IBoardContainer>(); this.OneWayBind(ViewModel, vm => vm.Value, v => v.SquareButton.Text); appearAnimation = new Animation(v => this.Scale = v, 0, 1); }
public async Task ValidateAsync(IBoardContainer boardContainer) { if (boardContainer == null) { throw new ArgumentNullException(nameof(boardContainer)); } var department = await GetBy(boardContainer); if (boardContainer.BoardId.HasValue && department == null) { throw new InvalidOperationException($"Board not found by id {boardContainer.BoardId}"); } }
public Task <IEnumerable <Issue> > GetByAsync(IBoardContainer board) { BoardGetService.ValidateAsync(board); return(IssueDataAccess.GetByAsync(board)); }
public async Task <IEnumerable <Issue> > GetByAsync(IBoardContainer board) { return(Mapper.Map <IEnumerable <Issue> >( await Context.Issue.Include(x => x.BoardId == board.BoardId) .ToListAsync())); }
public SquareSpawner(IBoardContainer container = null) { boardContainer = container ?? Locator.Current.GetService <IBoardContainer>(); random = new Random(); }
private async Task <Board> GetBy(IBoardContainer boardContainer) { return(await BoardDataAccess.GetByAsync(boardContainer)); }
public async Task <Board> GetByAsync(IBoardContainer board) { return(board.BoardId.HasValue ? Mapper.Map <Board>(await Context.Board.FirstOrDefaultAsync(x => x.Id == board.BoardId)) : null); }
public GameLostChecker(IBoardContainer board = null) { boardContainer = board ?? Locator.Current.GetService <IBoardContainer>(); }
public SquareTranslator(IBoardContainer board = null) { this.boardContainer = board ?? Locator.Current.GetService <IBoardContainer>(); lastMove = MoveDirection.None; ChangeOccured = true; }