public GooglePlacesWcfResponse Convert(GooglePlacesApiResponse googlePlacesApiResponse)
        {
            var wcfResults = googlePlacesApiResponse.Results.Select(GetGooglePlacesWcfFromApiResult).ToList();
            Status status = googlePlacesApiResponse.Status;

            return new GooglePlacesWcfResponse { Results = wcfResults, Status = status };
        }
Exemplo n.º 2
0
        public async Task GetGlassInformation(Bitmap bitmap)
        {
            GooglePlacesApiData     googleApiData = new GooglePlacesApiData();
            GooglePlacesApiResponse responseData  = await googleApiData.GetApiResponseData("food");

            SimpleImageAnalysis imageInformation = new SimpleImageAnalysis(bitmap);
            int percentageOfLiquid = imageInformation.CalculatePercentageOfLiquid();

            Date       = DateTime.Today;
            Name       = responseData.results[0].name;
            Address    = responseData.results[0].vicinity;
            Percentage = percentageOfLiquid;
        }