refactoring
This commit is contained in:
parent
0be787c6fa
commit
c353e44d24
7 changed files with 80 additions and 84 deletions
21
Yavsc.Server/Models/IT/SourceCode/SingleCmdProjectBatch.cs
Normal file
21
Yavsc.Server/Models/IT/SourceCode/SingleCmdProjectBatch.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Yavsc.Server.Models.IT.SourceCode
|
||||
{
|
||||
public abstract class SingleCmdProjectBatch : Batch<Project>
|
||||
{
|
||||
protected string _repositoryRootPath;
|
||||
protected string _cmdPath ;
|
||||
public SingleCmdProjectBatch (string repoRoot, string cmdPath)
|
||||
{
|
||||
_cmdPath = cmdPath;
|
||||
_repositoryRootPath = repoRoot;
|
||||
WorkingDir = _repositoryRootPath;
|
||||
var fie = new DirectoryInfo(WorkingDir);
|
||||
if (!fie.Exists)
|
||||
throw new Exception ($"This directory doesn't exist: {WorkingDir},\nand cannot be used as a repository.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue