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