コード例 #1
0
        public async Task Should_Get_Players()
        {
            using (Clients.IPlayerClient client = new Clients.BitPokerRestClient())
            {
                var players = await client.GetPlayersAsync();

                Assert.IsNotNull(players);
            }
        }
コード例 #2
0
ファイル: HomeViewModel.cs プロジェクト: zilveer/BitPoker
        public async void RefreshMocksAsync()
        {
            this.IsBusy = true;

            using (Clients.BitPokerRestClient client = new Clients.BitPokerRestClient())
            {
                var result = await client.RefreshMocksAsync();

                //MessagingCenter.Send<HomeViewModel>(this, "Hi", new EventArgs());
            }

            this.IsBusy = false;
        }
コード例 #3
0
ファイル: HomeViewModel.cs プロジェクト: zilveer/BitPoker
        public async void GetPlayersAsync()
        {
            this.IsBusy = true;

            using (Clients.IPlayerClient client = new Clients.BitPokerRestClient())
            {
                var players = await client.GetPlayersAsync();

                foreach (PCL.Models.PlayerInfo player in players)
                {
                    this.Players.Add(new Models.ListItemModel()
                    {
                        Title = player.BitcoinAddress, Description = player.UserAgent
                    });
                }
            }

            this.IsBusy = false;
        }
コード例 #4
0
ファイル: TablesViewModel.cs プロジェクト: zilveer/BitPoker
        public async void GetTablesAsync()
        {
            this.IsBusy = true;

            using (Clients.ITableClient client = new Clients.BitPokerRestClient())
            {
                var tables = await client.GetTablesAsync();

                foreach (PCL.Models.TableInfo table in tables)
                {
                    this.Tables.Add(new Models.ListItemModel()
                    {
                        Title = table.Id.ToString()
                    });
                }
            }

            this.IsBusy = false;
        }