예제 #1
0
 private async void BtnExecute_Click(object sender, EventArgs e)
 {
     tbProgress.Clear();
     var progress    = new Progress <string>(update => tbProgress.AppendText(update + Environment.NewLine));
     var domainCheck = new NicRuWhois(chromiumSettings: CompositionRoot.Resolve <IChromiumSettings>(), progressLog: progress);
     await domainCheck.RunScenario(domains : textBox8.Lines);
 }
예제 #2
0
        public async Task <IHttpActionResult> PosWhois(string domain)
        {
            List <string> results;

            try
            {
                var engine = new NicRuWhois(_chromiumSettings);
                results = await engine.RunScenario(new[] { domain });
            }
            catch (Exception exception)
            {
                Log.Error(exception);
                return(InternalServerError());
            }
            return(Ok(results));
        }