コード例 #1
0
 public VirtualizedContentSession(VirtualizedContentStore store, IContentSession session, VfsContentManager contentManager, string name)
     : base(name)
 {
     _store          = store;
     _innerSession   = session;
     _contentManager = contentManager;
     _fileSystem     = new PassThroughFileSystem();
 }
コード例 #2
0
        /// <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)
            _backingContentSession = _innerStore.CreateSession(context, "VFSInner", ImplicitPin.None).ThrowIfFailure().Session;
            await _backingContentSession.StartupAsync(context).ThrowIfFailure();

            _contentManager = new VfsContentManager(_logger, Configuration, _backingContentSession);

            return(await _contentManager.StartupAsync(context));
        }
コード例 #3
0
        /// <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));
        }