예제 #1
0
        public void Execute()
        {
            IIpCheckStrategy ipChecker;

            ipChecker = new DynDnsIPCheckStrategy();
            Console.WriteLine(ipChecker.GetExternalIp());

            ipChecker = new AwsIPCheckStrategy();
            Console.WriteLine(ipChecker.GetExternalIp());

            ipChecker = new CustomIpCheckStrategy();
            Console.WriteLine(ipChecker.GetExternalIp());

            Console.ReadKey();
        }
        public void Execute()
        {
            IIpCheckStrategy ipChecker;

            ipChecker = new DynDnsIPCheckStrategy();
            Console.WriteLine(ipChecker.GetExternalIp());

            ipChecker = new AwsIPCheckStrategy();
            Console.WriteLine(ipChecker.GetExternalIp());

            ipChecker = new CustomIpCheckStrategy();
            Console.WriteLine(ipChecker.GetExternalIp());

            Console.ReadKey();
        }