BoxedIce.ServerDensity.Agent.Agent.Stop C# (CSharp) Method

Stop() public method

Stops the agent.
public Stop ( ) : void
return void
        public void Stop()
        {
            _isStopped = true;
            _thread.Join(0);
            try
            {
                _thread.Abort();
            }
            catch (ThreadAbortException)
            {
            }
        }

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// Main method; used when running the agent as a standalone console EXE.
        /// </summary>
        public static void Main()
        {
            var config = (AgentConfigurationSection)ConfigurationManager.GetSection("agent");
            var agent  = new Agent(config);

            agent.Run();
            Console.ReadLine();
            agent.Stop();
        }
All Usage Examples Of BoxedIce.ServerDensity.Agent.Agent::Stop