Esempio n. 1
0
        static void Main(string[] args)
        {
            try
            {
                var parameters = GetParameters(args);
                var core = new Core(parameters);

                var extrasFolderCatalog = new DirectoryCatalog(@".\extras\");
                var currentAssemblyCatalog = new AssemblyCatalog(typeof(Program).Assembly);
                var aggregateCatalog = new AggregateCatalog(extrasFolderCatalog, currentAssemblyCatalog);

                var container = new CompositionContainer(aggregateCatalog);
                container.ComposeParts(core);

                core.Run();

                Console.WriteLine("Static site created successfully");

                if (Debugger.IsAttached)
                    Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());

                if (Debugger.IsAttached)
                    Console.ReadLine();

                Environment.ExitCode = 1;
            }
        }