private static DogImage ParseRandomImage(string json) { DogImage result; JObject dogApiResponse = JObject.Parse(json); string message = dogApiResponse["message"].ToString(); Uri dogImageUrl = new Uri(message); result = new DogImage { Url = message, Breed = new Breed(dogImageUrl.Segments[2].Replace("/", "")) }; return(result); }
public QuizQuestion(DogImage dogImage, int optionsNumber) { Image = dogImage; Options = LoadOptions(dogImage.Breed, optionsNumber); }