Start() public method

public Start ( ) : void
return void
示例#1
0
        static void Main(string[] config)
        {
            string cg;

            if(config.Length==0)
            {
              cg = "DefaultCavity";
            }
            else
            {
                cg = config[0];
            };

            Controller controller = new Controller(cg);

            // publish the controller to the remoting system
            TcpChannel channel = new TcpChannel(controller.config.TCPChannel);
            ChannelServices.RegisterChannel(channel, false);
            RemotingServices.Marshal(controller, "controller.rem");

            // hand over to the controller
            controller.Start();

            // the application is finishing - close down the remoting channel
            //RemotingServices.Disconnect(controller);
            //ChannelServices.UnregisterChannel(channel);
        }
示例#2
0
        static void Main()
        {
            Controller controller = new Controller();

            // publish the controller to the remoting system
            TcpChannel channel = new TcpChannel(1190);
            ChannelServices.RegisterChannel(channel, false);
            RemotingServices.Marshal(controller, "controller.rem");

            // hand over to the controller
            controller.Start();

            // the application is finishing - close down the remoting channel
               // RemotingServices.Disconnect(controller);
               // ChannelServices.UnregisterChannel(channel);
        }