Esempio n. 1
0
        static async Task RunAsync(string textTypeId, string result)
        {
            using var client = new HttpClient { BaseAddress = new Uri(BaseAddress) };
            var response = await client.GetAsync(string.Format(
                                                     $"{RequestUriGet}?typeId={textTypeId}&text={result}&id={result}"));

            var numberOfWords = await response.Content.ReadAsStringAsync();

            Console.WriteLine($"{TextType.FromId(textTypeId).DisplayText}: {numberOfWords}");
            Console.WriteLine("Press Enter.");
            Console.ReadLine();
        }
Esempio n. 2
0
 public GetTextQuery(string textTypeId, string text = null, string id = null)
 {
     Id               = id;
     Text             = text;
     SelectedTextType = TextType.FromId(textTypeId);
 }