public HitDataManager(IDWGitshConfig config, IStaticAbstraction diskManager, IRepositoryPaths repoDirs, IGitUtils utils = null, IHitDataRepo hitRepo = null) { _utils = utils ?? GitUtils.Current; this._diskManager = diskManager ?? new StAbWrapper(); this.RepositoryDirectories = repoDirs; _hitDataRepo = hitRepo ?? new HitDataRepo(config.AppDataFolder, _diskManager); }
// needed for unit testing internal GitUtils(IStaticAbstraction diskManager, ICacheContainer repoCache) : this() { if (diskManager != null) { _diskManager = diskManager; } if (repoCache != null) { RepoCache = repoCache; } Current = this; }
public DWGitshCommonArgs(IStaticAbstraction diskManager, IDWGitshConfig config, IRepositoryPaths repoPaths, IGitUtils utils, ICacheContainer cache) { this.DiskManager = diskManager ?? new StAbWrapper(); this.Config = config ?? new DWGitshConfig(DiskManager); this.Cache = cache ?? new CacheContainer(DiskManager); this.Utils = utils ?? new GitUtils(DiskManager, Cache); this.RepoPaths = repoPaths; }
public DWGitshCommonArgs(IStaticAbstraction diskManager, IDWGitshConfig config, IRepositoryPaths repoPaths, IGitUtils utils) : this(diskManager, config, repoPaths, utils, null) { }
static GitUtils() { Current = new GitUtils(); }