Exemplo n.º 1
0
        private async Task <IEnumerable <RspcaPet> > fetch()
        {
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "search?animal_type=0&state=4&location=0&breed=0&colour=0&sex=0&name=");

            request.Content = new StringContent("animal_type=0&state=4&location=0&breed=0&colour=0&sex=0&name=", Encoding.UTF8);
            HttpResponseMessage response = await client.SendAsync(request);

            string data = await response.Content.ReadAsStringAsync();

            var match = getPets.Match(data);

            data = match.Groups[1].Value;
            return(RspcaPet.Parse(data));
        }
Exemplo n.º 2
0
        private static bool shelterAllowed(RspcaPet pet)
        {
            string location = pet.shelter;

            return(location == LOCATION_ADELAIDE_ANIMAL_HOSPITAL ||
                   location == LOCATION_ALDINGA_VET_SERVICES ||
                   location == LOCATION_HILLS_VETERINARY_CENTRE ||
                   location == LOCATION_LONSDALE_SHELTER ||
                   location == LOCATION_MAIN_NORTH_ROAD_VET_SERVICE ||
                   location == LOCATION_PET_UNIVERSE_BROADVIEW ||
                   location == LOCATION_PETBARN_ELIZABETH ||
                   location == LOCATION_PETBARN_HENDON ||
                   location == LOCATION_PETBARN_HOLDEN_HILL ||
                   location == LOCATION_PETBARN_MELROSE_PARK ||
                   location == LOCATION_PETBARN_MILE_END ||
                   location == LOCATION_PETBARN_NOARLUNGA ||
                   location == LOCATION_PETBARN_NORWOOD ||
                   location == LOCATION_PETBARN_PROSPECT
                   //|| location == LOCATION_PORT_LINCOLN_SHELTER
                   || location == LOCATION_PROSPECT_ROAD_VET ||
                   location == LOCATION_SEMAPHORE_VET_CLINIC
                   //|| location == LOCATION_WHYALLA_SHELTER
                   );
        }