static void Main(string[] args)
        {
            System.Console.WriteLine("UPnP .NET Framework Stack");
            System.Console.WriteLine("StackBuilder Build#Device Builder Build#1.0.4144.25068");

            DimmableLightDiscovery disco = new DimmableLightDiscovery();
            disco.OnAddedDevice += new DimmableLightDiscovery.DiscoveryHandler(AddSink);
            disco.OnRemovedDevice += new DimmableLightDiscovery.DiscoveryHandler(RemoveSink);

            System.Console.WriteLine("Press return to stop CP.");
            disco.Start();

            string x = "";
            bool bo = new bool();
            object obj = new object();

            //CpSwitchPower.Delegate_OnResult_GetStatus del = CpSwitchPower.Delegate_OnResult_GetStatus();

            while (x != "q")
            {
                x  = System.Console.ReadLine();
                if (x == "on")
                    sw.SetTarget(true);
                else if (x == "off")
                    sw.SetTarget(false);
                else if (x == "check")
                {
                    sw.Sync_GetTarget(out bo);
                    Console.WriteLine(bo);

                }

            }
        }
        static void Main(string[] args)
        {
            System.Console.WriteLine("UPnP .NET Framework Stack");
            System.Console.WriteLine("StackBuilder Build#Device Builder Build#1.0.4144.25068");

            DimmableLightDiscovery disco = new DimmableLightDiscovery();
            disco.OnAddedDevice += new DimmableLightDiscovery.DiscoveryHandler(AddSink);
            disco.OnRemovedDevice += new DimmableLightDiscovery.DiscoveryHandler(RemoveSink);

            System.Console.WriteLine("Press return to stop CP.");
            disco.Start();

            System.Console.ReadLine();
        }