Exemplo n.º 1
0
        /// <summary>
        /// The main entry point for the application.
        /// Starts off the service in question.
        /// </summary>
        public static void Main(string[] arguments)
        {
            // Check if an instance of this program already exists.
            // If it does, exit.
            if (Process.GetProcessesByName("ReloadedAssembler").Length > 1)
            {
                Environment.Exit(0);
            }

            // Else start async server.
            FasmServer fasmServer = new FasmServer();

            // Auto-shutdown when all Reloaded instances die.
            Thread.Sleep(Timeout.Infinite);
        }
Exemplo n.º 2
0
        /// <summary>
        /// The main entry point for the application.
        /// Starts off the service in question.
        /// </summary>
        public static void Main(string[] arguments)
        {
            // Check if an instance of this program already exists.
            // If it does, exit.
            if (Process.GetProcessesByName("ReloadedAssembler").Length > 1)
            {
                Environment.Exit(0);
            }

            FasmServer fasmServer = new FasmServer();

            // Wait for a client to connect.
            while (fasmServer.ReloadedServer.PeersCount == 0)
            {
                Thread.Sleep(5000);
            }

            // Reloaded Assembler will Terminate Self after all clients disconnect.
            while (fasmServer.ReloadedServer.PeersCount != 0)
            {
                Thread.Sleep(5000);
            }
        }