• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IFileProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IFileProvider的典型用法代码示例。如果您正苦于以下问题:C# IFileProvider类的具体用法?C# IFileProvider怎么用?C# IFileProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IFileProvider类属于命名空间,在下文中一共展示了IFileProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TemplatingContext

 public TemplatingContext(string basePath, TemplateData data, IEnumerable<IAssetUriResolver> resolvers, IFileProvider fileProvider)
 {
     this.BasePath = basePath;
     this.TemplateData = data;
     this.AssetUriResolvers = resolvers.ToArray();
     this.FileProvider = fileProvider;
 }
开发者ID:abclassic,项目名称:LBi.LostDoc,代码行数:7,代码来源:TemplatingContext.cs


示例2: ResourceDeployment

 public ResourceDeployment(IFileProvider fileProvider, string path, string destination, IResourceTransform[] transforms)
 {
     this.FileProvider = fileProvider;
     this.ResourcePath = path;
     this.Destination = destination;
     this.Transforms = transforms;
 }
开发者ID:ppittle,项目名称:LBi.LostDoc,代码行数:7,代码来源:ResourceDeployment.cs


示例3: FileProviderGlobbingDirectory

        public FileProviderGlobbingDirectory(
            [NotNull] IFileProvider fileProvider,
            IFileInfo fileInfo,
            FileProviderGlobbingDirectory parent)
        {
            _fileProvider = fileProvider;
            _fileInfo = fileInfo;
            _parent = parent;

            if (_fileInfo == null)
            {
                // We're the root of the directory tree
                RelativePath = string.Empty;
                _isRoot = true;
            }
            else if (!string.IsNullOrEmpty(parent?.RelativePath))
            {
                // We have a parent and they have a relative path so concat that with my name
                RelativePath = _parent.RelativePath + DirectorySeparatorChar + _fileInfo.Name;
            }
            else
            {
                // We have a parent which is the root, so just use my name
                RelativePath = _fileInfo.Name;
            }
        }
开发者ID:RehanSaeed,项目名称:Mvc,代码行数:26,代码来源:FileProviderGlobbingDirectory.cs


示例4: Properties

 public Properties(IFileProvider fileProvider, string filename)
 {
     _list = new Dictionary<String, object>();
     _fileProvider = fileProvider;
     _filename = filename;
     LoadFromFile(_filename,"");
 }
开发者ID:vgillestad,项目名称:OpenDDR-ASP.NET,代码行数:7,代码来源:Properties.cs


示例5: BaseDocumentHandler

 public BaseDocumentHandler(IFileProvider fileProvider, string subpath)
 {
     FileInfo = AcceptedExtensions
         .Select(x => fileProvider.GetFileInfo(subpath + x))
         .Where(x => x.Exists)
         .FirstOrDefault();
 }
开发者ID:MakingSense,项目名称:aspnet-documentation-middleware,代码行数:7,代码来源:BaseDocumentHandler.cs


示例6: DefaultChunkTreeCache

 // Internal for unit testing
 internal DefaultChunkTreeCache(
     IFileProvider fileProvider,
     MemoryCacheOptions options)
 {
     _fileProvider = fileProvider;
     _chunkTreeCache = new MemoryCache(options);
 }
开发者ID:ymd1223,项目名称:Mvc,代码行数:8,代码来源:DefaultChunkTreeCache.cs


示例7: RSS20ContentProvider

 public RSS20ContentProvider(IFileProvider fileProvider, Func<IEnumerable<Dictionary<string, string>>> getContentData, string feedTitle, string feedDescription, string feedLink)
     : base(fileProvider, getContentData)
 {
     this._feedTitle = feedTitle;
     this._feedDescription = feedDescription;
     this._feedLink = feedLink;
 }
开发者ID:tucaz,项目名称:GoogleShoppingFeed,代码行数:7,代码来源:RSS20ContentProvider.cs


示例8: AddYamlFile

        public static IConfigurationBuilder AddYamlFile(this IConfigurationBuilder builder, IFileProvider provider, string path, bool optional, bool reloadOnChange)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentException("InvalidFilePath", nameof(path));
            }

            if (provider == null && Path.IsPathRooted(path))
            {
                provider = new PhysicalFileProvider(Path.GetDirectoryName(path));
                path = Path.GetFileName(path);
            }
            var source = new YamlConfigurationSource
            {
                FileProvider = provider,
                Path = path,
                Optional = optional,
                ReloadOnChange = reloadOnChange
            };
            builder.Add(source);
            return builder;
        }
开发者ID:jchenga,项目名称:Orchard2,代码行数:26,代码来源:YamlConfigurationExtensions.cs


示例9: TryResolveHandler

 public bool TryResolveHandler(IFileProvider fileProvider, string subpath, out IDocumentHandler handler)
 {
     handler = GetHandlers(fileProvider, subpath)
         .Where(x => x.CanHandleRequest)
         .FirstOrDefault();
     return handler != null;
 }
开发者ID:MakingSense,项目名称:aspnet-documentation-middleware,代码行数:7,代码来源:DefaultDocumentHandlerResolver.cs


示例10: FileEffectiveRights53EntityOperationEvaluator

 public FileEffectiveRights53EntityOperationEvaluator(
     FileEffectiveRightsObjectCollector objectCollector, IFileProvider fileProvider)
 {
     this.FileEffectiveRights53SystemDataSource = objectCollector;
     this.FileProvider = fileProvider;
     this.PathOperatorEvaluator = new PathOperatorEvaluator(fileProvider, FamilyEnumeration.windows);
 }
开发者ID:jonaslsl,项目名称:modSIC,代码行数:7,代码来源:FileEffectiveRights53EntityOperationEvaluator.cs


示例11: PluginCompositeFileProvider

 public PluginCompositeFileProvider(IPluginManager pluginManager, IFileProvider defaultFileProvider, string subfolder=null)
 {
     var pluginsFileProviders = new List<IFileProvider>(pluginManager.LoadedPlugins.Count()+1);
     pluginsFileProviders.Add(defaultFileProvider);
     pluginsFileProviders.AddRange(GetPluginFileProviders(pluginManager, subfolder));
     _fileProvider = new CompositeFileProvider(pluginsFileProviders);
 }
开发者ID:genusP,项目名称:AspNet5-Modularity,代码行数:7,代码来源:PluginCompositeFileProvider.cs


示例12: CssDataUriTransform

 /// <summary>
 /// Constructs an instance of the <see cref="CssDataUriTransform"/> class with a custom set of exclusions
 /// </summary>
 /// <param name="fileProvider">A wrapper for access to the file system</param>
 /// <param name="exclusions">The exclusions to apply to matches</param>
 public CssDataUriTransform(IFileProvider fileProvider, params IExclude[] exclusions) : this(fileProvider)
 {
     foreach (var exclusion in exclusions)
     {
         _exclusions.Add(exclusion);
     }
 }
开发者ID:jfbourke,项目名称:JB.WebOptimization.Transformers,代码行数:12,代码来源:CssDataUriTransform.cs


示例13: HomeworkController

 public HomeworkController(IFileProvider fileProvider, IStudentHomeworkProvider studentHWProvider, IModuleProvider moduleProvider, IHomeworkProvider homeworkProvider)
 {
     _moduleProvider = moduleProvider;
     _homeworkProvider = homeworkProvider;
     _studentHWProvider = studentHWProvider;
     _fileProvider = fileProvider;
 }
开发者ID:ducaiulia,项目名称:eUni,代码行数:7,代码来源:HomeworkController.cs


示例14: AtomContentProvider

 public AtomContentProvider(IFileProvider fileProvider, Func<IEnumerable<Dictionary<string, string>>> getContentData, string feedTitle, string feedLink, string feedAuthor, string feedId)
     : base(fileProvider, getContentData)
 {
     this._feedTitle = feedTitle;
     this._feedAuthor = feedAuthor;
     this._feedLink = feedLink;
     this._feedId = feedId;
 }
开发者ID:tucaz,项目名称:GoogleShoppingFeed,代码行数:8,代码来源:AtomContentProvider.cs


示例15: TemplateInfo

 // TODO we can eliminate the TemplateResolver here once we remove it as a requirement for the Template class
 public TemplateInfo(IFileProvider source, string path, string name, TemplateParameterInfo[] parameters, TemplateInfo inheritedTemplate)
 {
     this.Source = source;
     this.Name = name;
     this.Parameters = parameters;
     this.Path = path;
     this.Inherits = inheritedTemplate;
 }
开发者ID:LBiNetherlands,项目名称:LBi.LostDoc,代码行数:9,代码来源:TemplateInfo.cs


示例16: DirectoryHandler

 public DirectoryHandler(IFileProvider fileProvider, string path, DirectoryOptions options)
 {
     _fileProvider = fileProvider;
     _path = path;
     _extensionsOptionsRegex = new Regex(String.Join("|", options.DirectoryBrowsingStripExtensions.Select(i => String.Concat(i.FirstOrDefault() == '.' ? @"\" : "", i, @"$"))));
     _directoryOptions = options;
     CanHandleRequest = _fileProvider.GetDirectoryContents(_path).Exists;
 }
开发者ID:MakingSense,项目名称:aspnet-documentation-middleware,代码行数:8,代码来源:DirectoryHandler.cs


示例17: Template

 public Template(IFileProvider fileProvider)
 {
     this._fileProvider = fileProvider;
     this._fileResolver = new FileResolver();
     this._resolvers = new List<IAssetUriResolver>();
     this._resolvers.Add(this._fileResolver);
     this._resolvers.Add(new MsdnResolver());
 }
开发者ID:abclassic,项目名称:LBi.LostDoc,代码行数:8,代码来源:Template.cs


示例18: BasePanelViewModel

 public BasePanelViewModel(IFileProvider fileProvider, IDirectory currentDirectory)
 {
     this.fileProvider = fileProvider;
     this.fileProvider.FileChangedEvent += FileProviderOnFileChangedEvent;
     this.currentDirectory = currentDirectory;
     openCommand = new OpenFileCommand(this);
     FillDirectoryFiles();
 }
开发者ID:av0,项目名称:FileControl,代码行数:8,代码来源:BasePanelViewModel.cs


示例19: OddrDeviceService

 public OddrDeviceService(IFileProvider fileProvider, string pathToOddrProperties)
 {
     
     var properties = new Properties(fileProvider, pathToOddrProperties);
     _oddrService = new ODDRService(fileProvider);
     var defaultVocabularyIri = properties.GetProperty("oddr.vocabulary.device");
     _oddrService.Initialize(defaultVocabularyIri, properties);
 }
开发者ID:vgillestad,项目名称:OpenDDR-ASP.NET,代码行数:8,代码来源:OddrDeviceService.cs


示例20: PluginAssemblyProvider

 public PluginAssemblyProvider(IFileProvider fileProvider, ILoggerFactory loggerFactory,
     IAssemblyLoadContextAccessor loadContextAccessor, IAssemblyLoaderContainer assemblyLoaderContainer)
 {
     _logger = loggerFactory.CreateLogger<PluginAssemblyProvider>();
     _fileProvider = fileProvider;
     _loadContextAccessor = loadContextAccessor;
     _assemblyLoaderContainer = assemblyLoaderContainer;
     _candidates = new Lazy<IEnumerable<Assembly>>(FindPluginAssemblies);
 }
开发者ID:vnbaaij,项目名称:Umbraco9,代码行数:9,代码来源:PluginAssemblyProvider.cs



注:本文中的IFileProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IFileReader类代码示例发布时间:2022-05-24
下一篇:
C# IFileInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap