本文整理汇总了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;
}
示例2: ResourceDeployment
public ResourceDeployment(IFileProvider fileProvider, string path, string destination, IResourceTransform[] transforms)
{
this.FileProvider = fileProvider;
this.ResourcePath = path;
this.Destination = destination;
this.Transforms = transforms;
}
示例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;
}
}
示例4: Properties
public Properties(IFileProvider fileProvider, string filename)
{
_list = new Dictionary<String, object>();
_fileProvider = fileProvider;
_filename = filename;
LoadFromFile(_filename,"");
}
示例5: BaseDocumentHandler
public BaseDocumentHandler(IFileProvider fileProvider, string subpath)
{
FileInfo = AcceptedExtensions
.Select(x => fileProvider.GetFileInfo(subpath + x))
.Where(x => x.Exists)
.FirstOrDefault();
}
示例6: DefaultChunkTreeCache
// Internal for unit testing
internal DefaultChunkTreeCache(
IFileProvider fileProvider,
MemoryCacheOptions options)
{
_fileProvider = fileProvider;
_chunkTreeCache = new MemoryCache(options);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
}
示例13: HomeworkController
public HomeworkController(IFileProvider fileProvider, IStudentHomeworkProvider studentHWProvider, IModuleProvider moduleProvider, IHomeworkProvider homeworkProvider)
{
_moduleProvider = moduleProvider;
_homeworkProvider = homeworkProvider;
_studentHWProvider = studentHWProvider;
_fileProvider = fileProvider;
}
示例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;
}
示例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;
}