本文整理汇总了C#中IFileSystem类的典型用法代码示例。如果您正苦于以下问题:C# IFileSystem类的具体用法?C# IFileSystem怎么用?C# IFileSystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IFileSystem类属于命名空间,在下文中一共展示了IFileSystem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Bundler
public Bundler(IFileSystem system, IDeploymentController controller, DeploymentSettings settings, IBottleRepository bottles)
{
_system = system;
_controller = controller;
_settings = settings;
_bottles = bottles;
}
示例2: UseRazor
public static IAppBuilder UseRazor(this IAppBuilder builder, IFileSystem fileSystem)
{
Requires.NotNull(builder, "builder");
Requires.NotNull(fileSystem, "fileSystem");
return UseRazor(builder, fileSystem, "/");
}
示例3: CollectionManager
public CollectionManager(ILibraryManager libraryManager, IFileSystem fileSystem, ILibraryMonitor iLibraryMonitor, ILogger logger)
{
_libraryManager = libraryManager;
_fileSystem = fileSystem;
_iLibraryMonitor = iLibraryMonitor;
_logger = logger;
}
示例4: ProgressiveStreamWriter
/// <summary>
/// Initializes a new instance of the <see cref="ProgressiveStreamWriter" /> class.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="logger">The logger.</param>
/// <param name="fileSystem">The file system.</param>
public ProgressiveStreamWriter(string path, ILogger logger, IFileSystem fileSystem, TranscodingJob job)
{
Path = path;
Logger = logger;
_fileSystem = fileSystem;
_job = job;
}
示例5: SetInitialItemValues
/// <summary>
/// Sets the initial item values.
/// </summary>
/// <param name="item">The item.</param>
/// <param name="args">The args.</param>
/// <param name="fileSystem">The file system.</param>
/// <param name="libraryManager">The library manager.</param>
public static void SetInitialItemValues(BaseItem item, ItemResolveArgs args, IFileSystem fileSystem, ILibraryManager libraryManager)
{
// If the resolver didn't specify this
if (string.IsNullOrEmpty(item.Path))
{
item.Path = args.Path;
}
// If the resolver didn't specify this
if (args.Parent != null)
{
item.Parent = args.Parent;
}
item.Id = libraryManager.GetNewItemId(item.Path, item.GetType());
// Make sure the item has a name
EnsureName(item, args.FileInfo);
item.IsLocked = item.Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1 ||
item.Parents.Any(i => i.IsLocked);
// Make sure DateCreated and DateModified have values
EnsureDates(fileSystem, item, args, true);
}
示例6: ImageSaver
/// <summary>
/// Initializes a new instance of the <see cref="ImageSaver" /> class.
/// </summary>
/// <param name="config">The config.</param>
/// <param name="libraryMonitor">The directory watchers.</param>
/// <param name="fileSystem">The file system.</param>
/// <param name="logger">The logger.</param>
public ImageSaver(IServerConfigurationManager config, ILibraryMonitor libraryMonitor, IFileSystem fileSystem, ILogger logger)
{
_config = config;
_libraryMonitor = libraryMonitor;
_fileSystem = fileSystem;
_logger = logger;
}
示例7: ImageSaver
/// <summary>
/// Initializes a new instance of the <see cref="ImageSaver"/> class.
/// </summary>
/// <param name="config">The config.</param>
/// <param name="directoryWatchers">The directory watchers.</param>
public ImageSaver(IServerConfigurationManager config, IDirectoryWatchers directoryWatchers, IFileSystem fileSystem)
{
_config = config;
_directoryWatchers = directoryWatchers;
_fileSystem = fileSystem;
_remoteImageCache = new FileSystemRepository(config.ApplicationPaths.DownloadedImagesDataPath);
}
示例8: Move
public static void Move(this IFileSystem sourceFileSystem, FileSystemPath sourcePath, IFileSystem destinationFileSystem, FileSystemPath destinationPath)
{
IEntityMover mover;
if (!EntityMovers.Registration.TryGetSupported(sourceFileSystem.GetType(), destinationFileSystem.GetType(), out mover))
throw new ArgumentException("The specified combination of file-systems is not supported.");
mover.Move(sourceFileSystem, sourcePath, destinationFileSystem, destinationPath);
}
示例9: FanArtAlbumProvider
/// <summary>
/// Initializes a new instance of the <see cref="FanArtAlbumProvider"/> class.
/// </summary>
/// <param name="httpClient">The HTTP client.</param>
/// <param name="logManager">The log manager.</param>
/// <param name="configurationManager">The configuration manager.</param>
/// <param name="providerManager">The provider manager.</param>
public FanArtAlbumProvider(IHttpClient httpClient, ILogManager logManager, IServerConfigurationManager configurationManager, IProviderManager providerManager, IFileSystem fileSystem)
: base(logManager, configurationManager)
{
_providerManager = providerManager;
_fileSystem = fileSystem;
HttpClient = httpClient;
}
示例10: CreateDocument
private static XDocument CreateDocument(XName rootName, IFileSystem fileSystem, string path)
{
XDocument document = new XDocument(new XElement(rootName));
// Add it to the file system
fileSystem.AddFile(path, document.Save);
return document;
}
示例11: GetDocument
private static XDocument GetDocument(IFileSystem fileSystem, string path)
{
using (Stream configStream = fileSystem.OpenFile(path))
{
return XDocument.Load(configStream, LoadOptions.PreserveWhitespace);
}
}
示例12: CreatePackageManager
protected override IPackageManager CreatePackageManager(IFileSystem packagesFolderFileSystem) {
var sourceRepository = GetRepository();
var pathResolver = new CustomPackagePathResolver(packagesFolderFileSystem, true) {
OverlayDirectory = OverlayPackageDirectory
};
return new PackageManager(sourceRepository, pathResolver, packagesFolderFileSystem, new LocalPackageRepository(pathResolver, packagesFolderFileSystem)) { Logger = base.Console };
}
示例13: CreateSharedRepository
public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, IFileSystem configSettingsFileSystem)
{
PathResolverPassedToCreateSharedRepository = pathResolver;
FileSystemPassedToCreateSharedRepository = fileSystem;
ConfigSettingsFileSystemPassedToCreateSharedRepository = configSettingsFileSystem;
return FakeSharedRepository;
}
示例14: DeploymentStatusManager
public DeploymentStatusManager(IEnvironment environment,
IFileSystem fileSystem)
{
_environment = environment;
_fileSystem = fileSystem;
_activeFile = Path.Combine(environment.DeploymentCachePath, Constants.ActiveDeploymentFile);
}
示例15: WritableXapFile
protected WritableXapFile(string outputPath, IFileSystem fileSystem)
: base(outputPath, fileSystem.OpenArchive(outputPath, ZipArchiveMode.Update))
{
FileSystem = fileSystem;
OutputPath = outputPath;
OutputArchive = InputArchive;
}