Example #1
0
        public static void Main(string[] args)
        {
            var entryAssembly = typeof(Program).GetTypeInfo().Assembly;

            MainLog.logManager = new Lazy <ILogManager>(() => new DummyLogManager());
            var rootPath = entryAssembly.Location.ToAbsoluteFilePath().ParentDirectoryPath;

            CommonBase.AssemblyLoader = new AssemblyLoader(entryAssembly, null, rootPath);
            Common.Flags = new Common.StartupFlags(args, true);

            var bs = new CoreAppBootstrapper(args, rootPath);

            bs.Configure();

            TaskExt.StartLongRunningTask(() => Start(bs)).WaitAndUnwrapException();

            Console.WriteLine("Hello world!");
            Console.ReadLine();
        }
Example #2
0
 private static async Task Start(CoreAppBootstrapper bs)
 {
     await bs.Startup(async() => { }).ConfigureAwait(false);
 }