예제 #1
0
        public TplFile(string _projectPath, string _fileName)
        {
            this.fileDirectory = Path.Combine(_projectPath, Configs.Key_DefaultConfigsTplDictionary);
            this.fileName      = _fileName;
            string filePath = Path.Combine(this.fileDirectory, this.fileName);

            this.fileContent = File.ReadAllText(filePath);
            this.replaceSign = TplFile.TakeReplaceSignAndNodeName(this.fileContent);
        }
예제 #2
0
        internal static List <TplFile> GetTplFiles(string _projectPath)
        {
            List <TplFile> tplFiles = new List <TplFile>();
            string         tplPath  = Path.Combine(_projectPath, Configs.Key_DefaultConfigsTplDictionary);

            string[] tplFilesPath = Directory.GetFiles(tplPath, Configs.Key_SearchTplPattern);
            foreach (string tplFilePath in tplFilesPath)
            {
                var     tplFileSplits = tplFilePath.Split('\\');
                string  fileName      = tplFileSplits[tplFileSplits.Length - 1];
                TplFile tplFile       = new TplFile(_projectPath, fileName);
                tplFiles.Add(tplFile);
            }
            return(tplFiles);
        }
예제 #3
0
 public Configs(string _projectPath, TemplateEnvironment _currentEnvironment)
 {
     this.projectPath        = _projectPath;
     this.currentEnvironment = _currentEnvironment;
     this.TplFiles           = TplFile.GetTplFiles(this.projectPath);
 }