Aqueduct.Appia.Host.HtmlExporter.Export C# (CSharp) Method

Export() public method

public Export ( ) : void
return void
        public void Export()
        {
            Log("Exporting {0} to {1}", _basePath, _exportPath);
            ExportDynamicPages();
            ExportStaticContent();
        }

Usage Example

Ejemplo n.º 1
0
        static void Main(params string[] args)
        {
#if DEBUG
            Assembly.LoadFile(Path.Combine(Directory.GetCurrentDirectory(), "Aqueduct.Appia.Razor.dll"));
#endif

            var options = new Options();
            ICommandLineParser parser = new CommandLineParser();
            parser.ParseArguments(args, options);

            if (string.IsNullOrEmpty(options.ExportPath) == false)
            {
                var exporter = new HtmlExporter(options.ExportPath,
                                                new Configuration(),
                                                new Aqueduct.Appia.Core.Bootstrapper())
                {
                    Verbose = options.Verbose
                };
                exporter.Initialise();
                exporter.Export();
            }
            else
            {
                var ip        = options.Address == "*" ? IPAddress.Any : IPAddress.Parse(options.Address);
                var nancyHost = new NancyHost(ip, options.Port, new Aqueduct.Appia.Core.Bootstrapper());
                nancyHost.Start();

                Console.WriteLine(String.Format("Nancy now listening - navigate to http://{0}:{1}/. Press enter to stop", options.Address, options.Port));
                Console.ReadKey();

                nancyHost.Stop();

                Console.WriteLine("Stopped. Good bye!");
            }
        }
All Usage Examples Of Aqueduct.Appia.Host.HtmlExporter::Export