Ejemplo n.º 1
0
        internal static List <IDisconnectCallback> myClients = new List <IDisconnectCallback>(); //list of servers clients
        static void Main(string[] args)
        {
            //connect to CMS on start-up
            try
            {
                EventLogManager.InitializeServerEventLog();

                cmsClient = ConnectToCMS();
                if (cmsClient == null)
                {
                    throw new Exception("Connection with CMS not established");
                }

                Console.WriteLine("*Successfully connected to CMS*");
                Prompt();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                cmsClient.Close();
            }

            Console.WriteLine("\n> Press enter to close program");
            Console.ReadLine();
        }