Beispiel #1
0
        public AzureClient(string serviceUrl)
        {
            ServiceUrl = serviceUrl;
            Client     = new MobileServiceClient(serviceUrl);

            //Resources
            User  = new UserResource(this);
            Beers = new BeerResource(this);
        }
Beispiel #2
0
        public async Task CustomType()
        {
            var newClient = new BreweryDbClient(Keys.ApplicationKey);
            var Beers     = new BeerResource <MyBeer>(newClient);

            var response = await Beers.GetAll();

            Assert.IsTrue(response.Status == "success");
            Assert.IsTrue(response.CurrentPage == 1);
            Assert.IsTrue(response.NumberOfPages >= 1);
            Assert.IsTrue(response.TotalResults >= 1019);
        }
Beispiel #3
0
        public async Task CustomType()
        {
            var newClient = new BreweryDbClient(Keys.ApplicationKey);
            var Beers = new BeerResource<MyBeer>(newClient);
            
            var response = await Beers.GetAll();
            
            Assert.IsTrue(response.Status == "success");
            Assert.IsTrue(response.CurrentPage == 1);
            Assert.IsTrue(response.NumberOfPages >= 1);
            Assert.IsTrue(response.TotalResults >= 1019);

        }
Beispiel #4
0
        public BreweryDbClient(string key)
        {
            ApplicationKey = key;

            Beers = new BeerResource<Beer>(this);
            Breweries = new BreweryResource<Brewery>(this);
            Categories = new CategoryResource<Category>(this);
            Adjuncts = new AdjunctResource<Adjunct>(this);
            Yeasts = new YeastResource<Yeast>(this);
            SocialSites = new SocialSiteResource<SocialSite>(this);
            Events = new EventResource<Event>(this);
            Features = new FeatureResource<Feature>(this);
            Guildes = new GuildResource<Guild>(this);
            Fermentables = new FermentableResource<Fermentable>(this);
            FluidSizes = new FluidSizeResource<FluidSize>(this);
            Changes = new ChangeResource<Change>(this);
        }
Beispiel #5
0
        public BreweryDbClient(string key, Func <HttpClient> httpClientFactory = null)
        {
            ApplicationKey = key;

            if (httpClientFactory != null)
            {
                JsonDownloader.HttpClientFactory = httpClientFactory;
            }

            Beers        = new BeerResource <Beer>(this);
            Breweries    = new BreweryResource <Brewery>(this);
            Categories   = new CategoryResource <Category>(this);
            Adjuncts     = new AdjunctResource <Adjunct>(this);
            Yeasts       = new YeastResource <Yeast>(this);
            SocialSites  = new SocialSiteResource <SocialSite>(this);
            Events       = new EventResource <Event>(this);
            Features     = new FeatureResource <Feature>(this);
            Guildes      = new GuildResource <Guild>(this);
            Fermentables = new FermentableResource <Fermentable>(this);
            FluidSizes   = new FluidSizeResource <FluidSize>(this);
            Changes      = new ChangeResource <Change>(this);
        }