예제 #1
0
        static void WrapperExample(NpcReflector npcReflector, INpcHtmlGenerator htmlGenerator, UInt16 port)
        {
            NpcServerSingleThreaded wrapper = new NpcServerSingleThreaded(NpcLoggerCallback.ConsoleLogger, npcReflector,
                                                                          htmlGenerator, port);

            wrapper.Run();
        }
예제 #2
0
        //[TestMethod]
        public void RunSingleThreadServer()
        {
            NpcServerControl npcServerControl = new NpcServerControl();
            NpcReflector     reflector        = new NpcReflector(
                new TestRemoteDevice(),
                npcServerControl,
                new NpcExecutionObject(new TestRemoteDevice(), "Other", null, null),
                new NpcExecutionObject(new NpcMethodsForTest(), "Test", null, null),
                new InheritBothRoots());

            NpcServerSingleThreaded server = new NpcServerSingleThreaded(
                new NpcServerLoggerCallback(Console.Out),
                reflector,
                new DefaultNpcHtmlGenerator("Test", reflector),
                1234);

            npcServerControl.server = server;

            server.Run();
        }