Export() public method

public Export ( ) : void
return void
コード例 #1
0
ファイル: Program.cs プロジェクト: marto83/Appia
        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!");
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: aqueduct/Appia
        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!");
            }
        }