/// <nodoc /> public VfsContentManager(ILogger logger, VfsCasConfiguration configuration, IReadOnlyContentSession placer) { Tree = new VfsTree(configuration); _logger = logger; _configuration = configuration; _placer = placer; _fileSystem = new PassThroughFileSystem(); _tempDirectory = new DisposableDirectory(_fileSystem, configuration.DataRootPath / "temp"); Provider = new VfsProvider(logger, configuration, this); }
/// <inheritdoc /> protected override async Task <BoolResult> StartupCoreAsync(OperationContext context) { await _innerStore.StartupAsync(context).ThrowIfFailure(); // Create long-lived session to be used with overlay (ImplicitPin=None (i.e false) to avoid cache full errors) _vfsContentSession = _innerStore.CreateSession(context, "VFSInner", ImplicitPin.None).ThrowIfFailure().Session; await _vfsContentSession.StartupAsync(context).ThrowIfFailure(); _contentManager = new VfsContentManager(_logger, _configuration, Tree, _vfsContentSession); _provider = new VfsProvider(_logger, _configuration, _contentManager, Tree); if (!_provider.StartVirtualization()) { return(new BoolResult("Unable to start virtualizing")); } return(await base.StartupCoreAsync(context)); }
public RequiredCallbacks(VfsProvider provider) => this.provider = provider;