Beispiel #1
0
        static void Main(string[] args)
        {
            List <HmeServer> servers = new List <HmeServer>();

            servers.Add(new HmeServer <Animate>("Animate", new Uri("http://localhost:9688/Animate/")));
            servers.Add(new HmeServer <Clock>("Clock", new Uri("http://localhost:9688/Clock/")));
            servers.Add(new HmeServer <Effects>("Effects", new Uri("http://localhost:9688/Effects/")));
            servers.Add(new HmeServer <FontInfo>("Font Info", new Uri("http://localhost:9688/FontInfo/")));
            servers.Add(new HmeServer <Fractal>("Fractal", new Uri("http://localhost:9688/Fractal/")));
            servers.Add(new HmeServer <Pictures>("Pictures", new Uri("http://localhost:9688/Pictures/")));
            servers.Add(new HmeServer <TicTacToe>("Tic Tac Toe", new Uri("http://localhost:9688/TicTacToe/")));
            servers.Add(new HmeServer <Music>("Music", new Uri("http://localhost:9688/Music/")));
            servers.Add(new HmeServer <StreamingVideo>("Video", new Uri("http://localhost:9688/Video/")));
            servers.Add(new HmeServer <Transition>("Transition", new Uri("http://localhost:9688/Transition/")));
            HmeServer helloWorld = new HmeServer("Hello World", new Uri("http://localhost:9688/HelloWorld/"));

            helloWorld.ApplicationConnected += new EventHandler <HmeApplicationConnectedEventArgs>(server_ApplicationConnected);
            servers.Add(helloWorld);

            servers.ForEach(delegate(HmeServer server)
            {
                server.Start();
            });

            Console.WriteLine("Sample applications started.  Press enter to exit.");
            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Tivo.Hmo.DiscoveryBeacon.Start();
            HmeServer <DiskUsageApp> server = new HmeServer <DiskUsageApp>("Disk Usage", new Uri("http://localhost:9688/DiskUsage/"));

            server.Start();
            Console.WriteLine("Tivo disk usage application started.  Press enter to exit.");
            Console.ReadLine();
            server.Stop();
        }
Beispiel #3
0
 public HttpHandlerRegistryService(HmeServer server)
 {
     _server = server;
     _server.NonApplicationRequestReceivedArgs += new EventHandler <NonApplicationRequestReceivedArgs>(_server_NonApplicationRequestReceivedArgs);
 }