Пример #1
0
        private static async Task Run(Options options)
        {
            var lookup = new WhoisLookup();

            var result = await lookup.LookupAsync(options.Query);

            if (options.ConvertToJson)
            {
                result.Content = null;

                var json = JsonConvert.SerializeObject(result, Formatting.Indented);

                Console.WriteLine(json);
            }
            else
            {
                Console.WriteLine(result.Content);
            }

            lookup.Dispose();
        }