예제 #1
0
        /// <summary>
        /// Main entry point
        /// </summary>
        /// <param name="args"></param>
        public static void Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                         .SetBasePath(Directory.GetCurrentDirectory())
                         .AddJsonFile("appsettings.json", true)
                         .AddEnvironmentVariables()
                         .AddEnvironmentVariables(EnvironmentVariableTarget.User)
                         .AddLegacyPublisherCommandLine(args)
                         .AddCommandLine(args)
                         .Build();

#if DEBUG
            if (args.Any(a => a.Contains("wfd", StringComparison.InvariantCultureIgnoreCase) ||
                         a.Contains("waitfordebugger", StringComparison.InvariantCultureIgnoreCase)))
            {
                Console.WriteLine("Waiting for debugger being attached...");
                while (!Debugger.IsAttached)
                {
                    Thread.Sleep(1000);
                }
                Console.WriteLine("Debugger attached.");
            }
#endif

            var module = new ModuleProcess(config);
            module.RunAsync().Wait();
        }
예제 #2
0
        /// <summary>
        /// Main entry point
        /// </summary>
        /// <param name="args"></param>
        public static void Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                         .SetBasePath(Directory.GetCurrentDirectory())
                         .AddJsonFile("appsettings.json", true)
                         .AddEnvironmentVariables()
                         .AddEnvironmentVariables(EnvironmentVariableTarget.User)
                         .AddLegacyPublisherCommandLine(args)
                         .Build();

            var module = new ModuleProcess(config);

            module.RunAsync().Wait();
        }