Exemplo n.º 1
0
 public VirtualFileProvider(
     IOptions <VirtualFileSystemOptions> options,
     IDynamicFileProvider dynamicFileProvider)
 {
     _options = options.Value;
     _compositeFileProvider = CreateCompositeProviderPrivate(dynamicFileProvider);
 }
Exemplo n.º 2
0
 public VirtualFileProvider(
     IOptions <AbpVirtualFileSystemOptions> options,
     IDynamicFileProvider dynamicFileProvider)
 {
     _options            = options.Value;
     _hybridFileProvider = CreateHybridProvider(dynamicFileProvider);
 }
Exemplo n.º 3
0
        public BundleManager(
            IOptions <BundlingOptions> options,
            IOptions <BundleContributorOptions> contributorOptions,
            IScriptBundler scriptBundler,
            IStyleBundler styleBundler,
            IWebHostEnvironment hostingEnvironment,
            IServiceProvider serviceProvider,
            IDynamicFileProvider dynamicFileProvider,
            IBundleCache bundleCache,
            IWebContentFileProvider webContentFileProvider,
            IWebRequestResources requestResources)
        {
            Options                = options.Value;
            ContributorOptions     = contributorOptions.Value;
            HostingEnvironment     = hostingEnvironment;
            ScriptBundler          = scriptBundler;
            ServiceProvider        = serviceProvider;
            DynamicFileProvider    = dynamicFileProvider;
            BundleCache            = bundleCache;
            WebContentFileProvider = webContentFileProvider;
            RequestResources       = requestResources;
            StyleBundler           = styleBundler;

            Logger = NullLogger <BundleManager> .Instance;
        }
Exemplo n.º 4
0
 public VirtualFileProvider(
     IOptions <XqVirtualFileSystemOptions> options,
     IDynamicFileProvider dynamicFileProvider)
 {
     _options      = options.Value;
     _fileProvider = CreateProvider(dynamicFileProvider);
 }
Exemplo n.º 5
0
        protected virtual IFileProvider CreateHybridProvider(IDynamicFileProvider dynamicFileProvider)
        {
            var fileProviders = new List <IFileProvider>();

            fileProviders.Add(dynamicFileProvider);

            foreach (var fileSet in _options.FileSets.AsEnumerable().Reverse())
            {
                fileProviders.Add(fileSet.FileProvider);
            }

            return(new CompositeFileProvider(fileProviders));
        }
Exemplo n.º 6
0
        protected virtual IFileProvider CreateHybridProvider(IDynamicFileProvider dynamicFileProvider)
        {
            var fileProviders = new List <IFileProvider>();

            fileProviders.Add(dynamicFileProvider);

            if (_options.FileSets.PhysicalPaths.Any())
            {
                fileProviders.AddRange(
                    _options.FileSets.PhysicalPaths
                    .Select(rootPath => new PhysicalFileProvider(rootPath))
                    .Reverse()
                    );
            }

            fileProviders.Add(new InternalVirtualFileProvider(_options));

            return(new CompositeFileProvider(fileProviders));
        }
Exemplo n.º 7
0
 protected virtual IFileProvider CreateCompositeProvider(IDynamicFileProvider dynamicFileProvider)
 {
     return(CreateCompositeProviderPrivate(dynamicFileProvider));
 }
Exemplo n.º 8
0
 public DynamicFileProvider_Tests()
 {
     _dynamicFileProvider = GetRequiredService <IDynamicFileProvider>();
 }
Exemplo n.º 9
0
 public DynamicFileProviderTests()
 {
     _dynamicFileProvider =
         ServiceSetup.GetVirtualFileSystemServiceProvider().GetRequiredService <IDynamicFileProvider>();
 }