当前位置: 首页>>代码示例>>C#>>正文


C# IFileProvider类代码示例

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


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


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