示例#1
0
        static int Main(string[] args)
        {
            HandleExceptions();
            PrintWelcome();

            var configPath =
                args.FirstOrDefault()
                ?? Path.Combine(AppDomain.CurrentDomain.BaseDirectory, DefaultConfigName);

            var config = LoadConfig(configPath);

            try
            {
                using (var heyman = new XmppHeyman(config))
                {
                    heyman.Start();
                    WaitForExit();
                    return(0);
                }
            }
            catch (Exception ex)
            {
                Logger.Fatal(ex);
                return(-1);
            }
        }
示例#2
0
        static int Main(string[] args)
        {
            HandleExceptions();
            PrintWelcome();

            var configPath =
                args.FirstOrDefault()
                ?? Path.Combine(AppDomain.CurrentDomain.BaseDirectory, DefaultConfigName);

            var config = LoadConfig(configPath);

            try
            {
                using (var heyman = new XmppHeyman(config))
                {
                    heyman.Start();
                    WaitForExit();
                    return 0;
                }
            }
            catch (Exception ex)
            {
                Logger.Fatal(ex);
                return -1;
            }
        }