Esempio n. 1
0
        static void Main(string[] args)
        {
            TaskBroker.Logger.CommonTape tape = new TaskBroker.Logger.CommonTape(new TaskBroker.Logger.LoggerEndpoint[] {
                new TaskBroker.Logger.ConsoleEndpoint(),
                new TaskBroker.Logger.FileEndpoint("log.txt")
            });

            TaskUniversum.ModApi.ScopeLogger.RegisterCommonTape(tape);
            bool benchConfiguration = true;// Array.IndexOf(args, "benchTasks") >= 0;// for plan or other params depends on tasks calculation

            if (Array.IndexOf(args, "inline") >= 0 || System.Diagnostics.Debugger.IsAttached)
            {
                ManualResetEvent  mre = new ManualResetEvent(false);
                BrokerApplication ba  = new BrokerApplication();
                ba.Run(mre, benchConfiguration, false);
                mre.WaitOne();
            }
            else
            {
                ApplicationKeeper.AppdomainLoop(benchConfiguration);
            }
            Console.WriteLine("! Application MAIN EXIT.");
            Console.ReadLine();
            return;
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            TaskBroker.Logger.CommonTape tape = new TaskBroker.Logger.CommonTape(new TaskBroker.Logger.LoggerEndpoint[] {
                new TaskBroker.Logger.ConsoleEndpoint(),
                new TaskBroker.Logger.FileEndpoint("log.txt")
            });

            TaskUniversum.ModApi.ScopeLogger.RegisterCommonTape(tape);

            if (System.Diagnostics.Debugger.IsAttached)
            {
                ManualResetEvent  mre = new ManualResetEvent(false);
                BrokerApplication ba  = new BrokerApplication();
                ba.Run(mre);
                mre.WaitOne();
            }
            else
            {
                ApplicationKeeper.AppdomainLoop();
            }
            Console.WriteLine("! Application MAIN EXIT.");
            Console.ReadLine();
            return;
        }