public async Task <List <KeyValuePair <string, decimal> > > AnalyzeTakenPhotoAsync(byte[] imageByteArray) { string imageContent = await PostImageContentAsync(imageByteArray); ImageAnalysisResultObject result = ParseImageContent(imageContent); if (!result.Status.Equals("Succeeded")) { throw new JsonException("De-serialization Failed"); } List <Lines> itemsAndPrices = result.RecognitionResults[0].Lines; return(PurifyImageContent(itemsAndPrices)); }
public async void AnalyzeTakenPhoto(byte[] imageByteArray) { string imageContent = await PostImageContentAsync(imageByteArray); ImageAnalysisResultObject result = ParseImageContent(imageContent); if (!result.Status.Equals("Succeeded")) { throw new Exception("Not successful"); } List <Lines> itemsAndPrices = result.RecognitionResults[0].Lines; itemPricePairs = PurifyImageContent(itemsAndPrices); }