コード例 #1
0
    static int Main(string[] args)
    {
        int ret = -1;

        CoresConfig.ApplyHeavyLoadServerConfigAll();

        //CoresConfig.LocalLargeFileSystemSettings.MaxSingleFileSize.SetValue(200);

        //Dbg.SetDebugMode(DebugMode.Debug, printStatToConsole: false, leakFullStack: false);

        CoresLib.Init(new CoresLibOptions(CoresMode.Application, "TestDev", DebugMode.Debug, defaultPrintStatToConsole: false, defaultRecordLeakFullStack: false), args);
        //CoresLib.Init(new CoresLibOptions(CoresMode.Library, "TestDevLib", DebugMode.ReleaseNoDebugLogs, defaultPrintStatToConsole: false, defaultRecordLeakFullStack: false), args);

        CoresLib.TryUpdateSelfIfNewerVersionIsReleased();

        try
        {
            ret = ConsoleService.EntryPoint(Env.CommandLine, "TestDev", typeof(TestDevAppMain));
        }
        finally
        {
            CoresLib.Free();
        }

        return(ret);
    }
コード例 #2
0
 public static void Init()
 {
     lock (Lock)
     {
         if (Once.IsFirstCall())
         {
             CoresLib.Init(new CoresLibOptions(CoresMode.Application, "UnitTest", DebugMode.Debug, defaultPrintStatToConsole: false, defaultRecordLeakFullStack: false));
         }
     }
 }
コード例 #3
0
        static int Main(string[] args)
        {
            int ret = -1;

            //Dbg.SetDebugMode(DebugMode.Debug, printStatToConsole: false, leakFullStack: false);

            CoresLib.Init(new CoresLibOptions(CoresMode.Daemon, "LogServer", DebugMode.Debug, defaultPrintStatToConsole: false, defaultRecordLeakFullStack: false), args);

            try
            {
                ret = ConsoleService.EntryPoint(Env.CommandLine, "LogServer", typeof(LogServerAppMain));
            }
            finally
            {
                CoresLib.Free();
            }

            return(ret);
        }
コード例 #4
0
        public static int DoMain(CoresLibOptions coresOptions, string[] args, Func <Daemon> getDaemonProc, DaemonSettings?defaultDaemonSettings = null)
        {
            DaemonMain.DefaultDaemonSettings = defaultDaemonSettings ?? new DaemonSettings();

            DaemonMain.GetDaemonProc = getDaemonProc ?? throw new ArgumentNullException("getDaemonProc");

            CoresLib.Init(coresOptions, args);

            try
            {
                return(ConsoleService.EntryPoint(Env.CommandLine, "Daemon", typeof(DaemonMain)));
            }
            finally
            {
                if (CoresLib.Free()?.LeakCheckerResult.HasLeak ?? false && Dbg.IsConsoleDebugMode)
                {
                    Console.ReadKey();
                }
            }
        }
コード例 #5
0
ファイル: Main.cs プロジェクト: IPA-CyberLab/IPA-DN-Cores
        static int Main(string[] args)
        {
            int ret = -1;

            CoresConfig.ApplyHeavyLoadServerConfigAll();

            //Dbg.SetDebugMode(DebugMode.Debug, printStatToConsole: false, leakFullStack: false);

            CoresLib.Init(new CoresLibOptions(CoresMode.Application, "SnmpWork", DebugMode.Debug, defaultPrintStatToConsole: false, defaultRecordLeakFullStack: false), args);

            try
            {
                ret = ConsoleService.EntryPoint(Env.CommandLine, "SnmpWork", typeof(SnmpWorkAppMain));
            }
            finally
            {
                CoresLib.Free();
            }

            return(ret);
        }