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

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

            string[] tplFilesPath = Directory.GetFiles(tplPath, "*.tpl");
            string[] array        = tplFilesPath;
            for (int i = 0; i < array.Length; i++)
            {
                string   tplFilePath   = array[i];
                string[] tplFileSplits = tplFilePath.Split(new char[]
                {
                    '\\'
                });
                string  fileName = tplFileSplits[tplFileSplits.Length - 1];
                TplFile tplFile  = new TplFile(_projectPath, fileName);
                tplFiles.Add(tplFile);
            }
            return(tplFiles);
        }
Beispiel #3
0
 public Configs(string _projectPath, TemplateEnvironment _currentEnvironment)
 {
     this.projectPath        = _projectPath;
     this.currentEnvironment = _currentEnvironment;
     this.TplFiles           = TplFile.GetTplFiles(this.projectPath);
 }