public IEnumerable<string> GetTemplateFiles(HttpServerUtility server, string templateType, string templateLocation)
{
var templatePathRootMapPath = server.MapPath(GetTemplatePathRoot(templateLocation, App));
var directory = new DirectoryInfo(templatePathRootMapPath);
EnsureTemplateFolderExists(templateLocation);
// Filter the files according to type
var fileFilter = "*.html";
switch (templateType)
{
case RazorC:
fileFilter = "*.cshtml";
break;
case RazorVb:
fileFilter = "*.vbhtml";
break;
case TokenReplace:
fileFilter = "*.html";
break;
}
var files = directory.GetFiles(fileFilter, SearchOption.AllDirectories);
return (from d in files where d.Name != Settings.WebConfigFileName select (d.FullName).Replace(templatePathRootMapPath + "\\", "").Replace('\\', '/'));
}