public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            if (!HostingEnvironment.IsHosted)
            {
                return;
            }

            var provider = new FileSystemVirtualPathProvider();

            HostingEnvironment.RegisterVirtualPathProvider(provider);

            packages.Each(x => x.ForFolder(BottleFiles.WebContentFolder, provider.RegisterContentDirectory));
        }
예제 #2
0
        public void Activate(IEnumerable <IPackageInfo> packages, IPackageLog log)
        {
            if (!HostingEnvironment.IsHosted)
            {
                return;
            }

            var provider = new FileSystemVirtualPathProvider();

            HostingEnvironment.RegisterVirtualPathProvider(provider);

            packages.Each(x => x.ForFolder(BottleFiles.WebContentFolder, provider.RegisterContentDirectory));
        }
예제 #3
0
        public void Activate(IEnumerable<IPackageInfo> packages, IPackageLog log)
        {
            if (!HostingEnvironment.IsHosted)
            {
                return;
            }
            
            var provider = new FileSystemVirtualPathProvider();

            HostingEnvironment.RegisterVirtualPathProvider(provider);

            packages.Each(x =>
            {
                x.ForFolder(BottleFiles.WebContentFolder, directory =>  
                {
                    log.Trace("Adding the bottle directory {0} to the virtual directory provider", directory);
                    provider.RegisterContentDirectory(directory);
                }
            );
            });
        }
예제 #4
0
        public void Activate(IEnumerable <IPackageInfo> packages, IPackageLog log)
        {
            if (!HostingEnvironment.IsHosted)
            {
                return;
            }

            var provider = new FileSystemVirtualPathProvider();

            HostingEnvironment.RegisterVirtualPathProvider(provider);

            packages.Each(x =>
            {
                x.ForFolder(BottleFiles.WebContentFolder, directory =>
                {
                    log.Trace("Adding the bottle directory {0} to the virtual directory provider", directory);
                    provider.RegisterContentDirectory(directory);
                }
                            );
            });
        }
예제 #5
0
 public void should_return_false_when_file_name_contains_invalid_characters()
 {
     var pathProvider = new FileSystemVirtualPathProvider();
     pathProvider.RegisterContentDirectory("/yada");
     pathProvider.FileExists("/yada\"");
 }