internal StreamedBlob(StreamedBlobRepository blrepo, BlobID id, long?length = null) { this.blrepo = blrepo; this.ID = id; this.Length = length; #if DEBUG // Catch the error early-on. if (!blrepo.FileSystem.getPathByID(id).Exists) { throw new BlobIDRecordDoesNotExistError(id); } #endif }
public FileSystemContext(DirectoryInfo rootDirectory) { this.RootDirectory = rootDirectory; FileSystem system = new FileSystem(this.RootDirectory); TreeRepository trrepo = new TreeRepository(system); StreamedBlobRepository blrepo = new StreamedBlobRepository(system); TreePathStreamedBlobRepository tpsbrepo = new TreePathStreamedBlobRepository(system, trrepo, blrepo); TagRepository tgrepo = new TagRepository(system); RefRepository rfrepo = new RefRepository(system); StageRepository strepo = new StageRepository(system); CommitRepository cmrepo = new CommitRepository(system, tgrepo, rfrepo); this.trrepo = trrepo; this.blrepo = blrepo; this.tpsbrepo = tpsbrepo; this.tgrepo = tgrepo; this.rfrepo = rfrepo; this.strepo = strepo; this.cmrepo = cmrepo; this.system = system; }
public TreePathStreamedBlobRepository(FileSystem system, TreeRepository trrepo = null, StreamedBlobRepository blrepo = null) { this.system = system; this.trrepo = trrepo ?? new TreeRepository(system); this.blrepo = blrepo ?? new StreamedBlobRepository(system); }
private static TestContext getTestContext(DateTimeOffset? viewDate = null, IConditionalEvaluator evaluator = null, ICustomElementProvider provider = null) { DateTimeOffset realDate = viewDate ?? DateTimeOffset.Now; FileSystem system = getFileSystem(); var trrepo = new TreeRepository(system); var blrepo = new StreamedBlobRepository(system); var tpsbrepo = new TreePathStreamedBlobRepository(system, trrepo, blrepo); return new TestContext(new ContentEngine(trrepo, blrepo, tpsbrepo, realDate, evaluator, provider), trrepo, blrepo, tpsbrepo); }