protected override IQuotaRule CreateRule(long currentSize, EvictResult evictResult = null)
        {
            var dummyPath = PathGeneratorUtilities.GetAbsolutePath("C", "dummy");
            var mock      = new TestAbsFileSystem(currentSize);

            var quota = new DiskFreePercentQuota(Hard, Soft);

            return(new DiskFreePercentRule(
                       quota,
                       mock,
                       new AbsolutePath(dummyPath)));
        }
Ejemplo n.º 2
0
        protected override IQuotaRule CreateRule(long currentSize, EvictResult evictResult = null)
        {
            var dummyPath = PathGeneratorUtilities.GetAbsolutePath("C", "dummy");
            var mock      = new TestAbsFileSystem(currentSize);

            var mockStore = new TestContentStoreInternal(dummyPath);

            var quota = new DiskFreePercentQuota(Hard, Soft);

            return(new DiskFreePercentRule(
                       quota,
                       (context, contentHashInfo, onlyUnlinked) => Task.FromResult(evictResult ?? new EvictResult("error")),
                       mock,
                       new AbsolutePath(dummyPath)));
        }