예제 #1
0
        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 CommitRepository(FileSystem system, TagRepository tgrepo = null, RefRepository rfrepo = null)
 {
     this.system = system;
     this.tgrepo = tgrepo ?? new TagRepository(system);
     this.rfrepo = rfrepo ?? new RefRepository(system);
 }
 public CommitRepository(FileSystem system, TagRepository tgrepo = null, RefRepository rfrepo = null)
 {
     this.system = system;
     this.tgrepo = tgrepo ?? new TagRepository(system);
     this.rfrepo = rfrepo ?? new RefRepository(system);
 }