private void CopyTemplatesFiles(string platform, string templateType) { var templatesDirectory = _routesManager.GetDirectoryFromSource(Path.Combine(Routes.TemplatesRootDirPath, platform)); var allDirectories = templatesDirectory.GetDirectories(templateType, SearchOption.AllDirectories); var names = allDirectories.SelectMany(d => d.GetDirectories().Where(c => !c.Name.EndsWith("VB"))).Select(d => d.Name); foreach (var name in names) { var templatePath = Path.Combine(Routes.TemplatesRootDirPath, platform, templateType, name, Routes.TemplateConfigDir); _routesManager.CopyFromSourceToDest(templatePath, Routes.TemplateJsonFile); _routesManager.CopyFromSourceToDest(templatePath, Routes.TemplateDescriptionFile); } }
private void ExtractTemplateEngineTemplates(string patternPath) { var srcDirectory = _routesManager.GetDirectoryFromSource(Routes.TemplatesRootDirPath); var directories = srcDirectory.GetDirectories(patternPath, SearchOption.AllDirectories); var templatesDirectories = directories.SelectMany(d => d.GetDirectories().Where(c => !c.Name.EndsWith("VB", StringComparison.OrdinalIgnoreCase))); foreach (var directory in templatesDirectories) { var path = GetTemplateRelativePath(directory); string pageSrcDirectory = Path.Combine(path, Routes.TemplateConfigDir); ExtractTemplateJson(pageSrcDirectory); ExtractTemplateDescription(pageSrcDirectory); } }
private void CopyTemplatesFiles(string platform, string templateType) { var baseDir = Path.Combine(Routes.TemplatesRootDirPath, platform, templateType); var templatesDirectory = _routesManager.GetDirectoryFromSource(baseDir); var directories = templatesDirectory.GetDirectories().Where(c => !c.Name.EndsWith("VB", StringComparison.OrdinalIgnoreCase)); foreach (var directory in directories) { var templatePath = Path.Combine(baseDir, directory.Name, Routes.TemplateConfigDir); if (!IsTemplateHidden(templatePath)) { _routesManager.CopyFromSourceToDest(templatePath, Routes.TemplateJsonFile); _routesManager.CopyFromSourceToDest(templatePath, Routes.TemplateDescriptionFile); } } }
private void ExtractTemplateEngineTemplates(string patternPath) { foreach (string platform in Routes.TemplatesPlatforms) { var baseDir = Path.Combine(Routes.TemplatesRootDirPath, platform, patternPath); var templatesDirectory = _routesManager.GetDirectoryFromSource(baseDir); var templatesDirectories = templatesDirectory.GetDirectories().Where(c => !c.Name.EndsWith("VB", StringComparison.OrdinalIgnoreCase)); foreach (var directory in templatesDirectories) { string templateSrcDirectory = Path.Combine(baseDir, directory.Name, Routes.TemplateConfigDir); ExtractTemplateJson(templateSrcDirectory); ExtractTemplateDescription(templateSrcDirectory); } } }