private StaticContentProvider BuildStaticContentProvider() { var rootPathProvider = new RootPathProvider(); var staticContnetConventions = new StaticContentsConventions(new List<Func<Context, string, Response>> { StaticContentConventionBuilder.AddDirectory("Content") }); var staticContentProvider = new StaticContentProvider(rootPathProvider, staticContnetConventions); FileResponse.SafePaths.Add(rootPathProvider.GetRootPath()); return staticContentProvider; }
public StaticContentProvider(RootPathProvider rootPathProvider, StaticContentsConventions conventions) { this.rootPathProvider = rootPathProvider; this.rootPath = this.rootPathProvider.GetRootPath(); this.conventions = conventions; }