コード例 #1
0
        public async Task <List <BinCollectionModel> > GetBinCollectionsDaysAsync(CouncilPostCodeRequest request)
        {
            List <BinCollectionModel> binCollectionModels = new List <BinCollectionModel>();

            if (IsConnected)
            {
                var json = await client.GetStringAsync($"api/postcode/address/bincollection");

                binCollectionModels = await Task.Run(() => JsonConvert.DeserializeObject <List <BinCollectionModel> >(json));
            }

            return(binCollectionModels);
        }
        public BinCollectionRequestViewModel()
        {
            PostcodeAddresses      = new PostcodeAddresses();
            UsersPostcodeAddresses = new List <string>();

            CouncilPostcodeRequest = new CouncilPostCodeRequest();

            BinCollectionDays = new List <BinCollectionModel>();

            var response = Task.Run(async() => await GetManchesterCouncils());

            ManchesterCouncils = response.Result;

            LoadAddressesCommand = new Command(async() => await GetAddresses());

            LoadBinCollectionDaysForPostCodeAndAddress = new Command(async() => await GetPostCodeAddressesBinCollectionDays());
        }