Abc.Zebus.TinyHost.Program.Program C# (CSharp) Method

Program() static private method

static private Program ( ) : System
return System
        static Program()
        {
            IODirectory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);

            TaskScheduler.UnobservedTaskException += (sender, args) =>
            {
                _logger.ErrorFormat("Task unhandled exception: {0}", args.Exception);
                args.SetObserved();
            };

            AppDomain.CurrentDomain.UnhandledException += (sender, args) => _logger.Error($"AppDomain unhandled exception: {args.ExceptionObject}, IsTerminating: {args.IsTerminating}");
        }