Exemple #1
0
 static void Main(string[] args)
 {
     try
     {
         PlatformLauncher.Launch(showPlatformToolConsoleOutput: true, servicePulseDefaultRoute: "/monitoring");
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         Console.ReadLine();
     }
 }
Exemple #2
0
        private static int Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            jingxian.install.DbInsteller installer = new jingxian.install.DbInsteller();
            if (!installer.Instell(true))
            {
                return(-1);
            }


            System.Threading.Thread.CurrentThread.Name = "jingxian GUI main";              //NON-NLS-1
            log4net.ILog log = null;

            CommandLineArguments arguments = new CommandLineArguments(args);

            if (!arguments.Succeeded)
            {
                // TODO write out error info
                System.Console.WriteLine(arguments.GetUsage());
                return(1);
            }
            else
            {
                if (RuntimeConfiguration.Instance.EnableLogging &&
                    !arguments.IsVerboseDefined)
                {
                    Logging.ConfigureLog4net(typeof(Bootstrap));
                    log = log4net.LogManager.GetLogger(typeof(Bootstrap));
                    log.Debug("Starting...");
                }
            }


            string binDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);


            IBatisNet.DataMapper.Configuration.DomSqlMapBuilder builder = new IBatisNet.DataMapper.Configuration.DomSqlMapBuilder();
            domainModel.SessionFactory.Mapper = builder.Configure(System.IO.Path.Combine(binDirectory, "db.Config"));

            Dictionary <string, object> context = new Dictionary <string, object>();

            context["startPerspective"] = jingxian.ui.Constants.PerspectiveId;
            context["layoutProvider"]   = jingxian.ui.LayoutProvider.PageLayoutProviderPointId;

            int exitCode = RuntimeConfiguration.Instance.ShowSplashScreen
                                                                                        ? PlatformLauncher.Launch(new ProductProvider(), context)
                                                                                        : PlatformRuntime.Launch(new ProductProvider(), arguments, context);

            string msg = string.Format("Exited with code {0}.", exitCode);

            if (log != null)
            {
                if (exitCode == 0)
                {
                    log.Debug(msg);
                }
                else
                {
                    log.Error(msg);
                }
            }
            else
            {
                System.Console.WriteLine(msg);
            }

            return(exitCode);
        }
 private static void Main()
 {
     Console.Title = "Particular Service Platform Launcher";
     PlatformLauncher.Launch();
 }