예제 #1
0
        public static DACSettings GetDefaultSettings()
        {
            DACSettings result = new DACSettings
            {
                Introduction          = "Please type a domain and press Enter. If you want to quit, write nothing and press Enter.",
                DomainAvailableText   = "Domain is available.",
                DomainUnavailableText = "Domain is not available.",
                ErroneousDomainText   = "Error.",
                PrintErrors           = true,
                FinishText            = "Bye."
            };

            return(result);
        }
예제 #2
0
파일: Program.cs 프로젝트: dahrari/DAC
        static void Main(string[] args)
        {
            bool printResultsAfterwards = true;

            DACConsoleSession session = new DACConsoleSession(DACSettings.GetDefaultSettings());

            Console.WriteLine("Starting...");
            DACSessionResult result = session.Start();

            if (printResultsAfterwards)
            {
                if (result.AvailableDomains != null)
                {
                    Console.WriteLine("\nAvailable domains:");
                    foreach (string domain in result.AvailableDomains)
                    {
                        Console.WriteLine(domain);
                    }
                }
                if (result.UnavailableDomains != null)
                {
                    Console.WriteLine("\nUnavailable domains:");
                    foreach (string domain in result.UnavailableDomains)
                    {
                        Console.WriteLine(domain);
                    }
                }
                if (result.ErroneousDomains != null)
                {
                    Console.WriteLine("\nErroneous domains:");
                    foreach (string domain in result.ErroneousDomains)
                    {
                        Console.WriteLine(domain);
                    }
                }
            }
        }
예제 #3
0
 public DACConsoleSession(DACSettings settings)
 {
     this.settings = settings;
 }