Exemplo n.º 1
0
        public static int Main(string[] args)
        {
            try
            {
                using var communicator = new Ice.Communicator(ref args, new Dictionary <string, string>()
                {
                    { "Ice.Admin.DelayCreation", "1" }
                });

                Console.CancelKeyPress += (sender, eventArgs) =>
                {
                    eventArgs.Cancel = true;
                    communicator.Shutdown();
                };

                return(Run(communicator, args));
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
                return(1);
            }
        }