// Consumers should use IoC or the Default UseRazor extension method to initialize this. public RazorApplication( AppFunc nextApp, IFileSystem fileSystem, string virtualRoot, IRouter router, ICompilationManager compiler, IPageActivator activator, IPageExecutor executor, ITraceFactory tracer) : this(nextApp) { Requires.NotNull(fileSystem, "fileSystem"); Requires.NotNullOrEmpty(virtualRoot, "virtualRoot"); Requires.NotNull(router, "router"); Requires.NotNull(compiler, "compiler"); Requires.NotNull(activator, "activator"); Requires.NotNull(executor, "executor"); Requires.NotNull(tracer, "tracer"); FileSystem = fileSystem; VirtualRoot = virtualRoot; Router = router; CompilationManager = compiler; Executor = executor; Activator = activator; Tracer = tracer; ITrace global = Tracer.ForApplication(); global.WriteLine("Started at '{0}'", VirtualRoot); }
// Consumers should use IoC or the Default UseEdge extension method to initialize this. public EdgeApplication( IFileSystem fileSystem, string virtualRoot, IRouter router, ICompilationManager compiler, IPageActivator activator, IPageExecutor executor, ITraceFactory tracer) : this() { Requires.NotNull(fileSystem, "fileSystem"); Requires.NotNullOrEmpty(virtualRoot, "virtualRoot"); Requires.NotNull(router, "router"); Requires.NotNull(compiler, "compiler"); Requires.NotNull(activator, "activator"); Requires.NotNull(executor, "executor"); Requires.NotNull(tracer, "tracer"); FileSystem = fileSystem; VirtualRoot = virtualRoot; Router = router; CompilationManager = compiler; Executor = executor; Activator = activator; Tracer = tracer; }