Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public StaticContentProvider(RootPathProvider rootPathProvider, StaticContentsConventions conventions)
 {
     this.rootPathProvider = rootPathProvider;
     this.rootPath         = this.rootPathProvider.GetRootPath();
     this.conventions      = conventions;
 }
Exemplo n.º 3
0
 public StaticContentProvider(RootPathProvider rootPathProvider, StaticContentsConventions conventions)
 {
     this.rootPathProvider = rootPathProvider;
     this.rootPath = this.rootPathProvider.GetRootPath();
     this.conventions = conventions;
 }