/// <summary> /// Dependent files are defined in following syntax in Mustache template leveraging Mustache Comments /// {{! include('file') }} /// file path can be wrapped by quote ' or double quote " or none /// </summary> /// <param name="template"></param> private IEnumerable <string> ExtractDependencyResourceNames(string template) { foreach (Match match in IncludeRegex.Matches(template)) { var filePath = match.Groups["file"].Value; foreach (var name in ParseTemplateHelper.GetResourceName(filePath, Path, _reader)) { yield return(name); } } }
private IEnumerable <string> ParseDependencies(string templateName, ResourceCollection resource, IEnumerable <string> raw) { return(from item in raw from name in ParseTemplateHelper.GetResourceName(item, templateName, resource) select name); }
private IEnumerable <string> ParseDependencies(string path, IResourceFileReader reader, IEnumerable <string> raw) { return(from item in raw from name in ParseTemplateHelper.GetResourceName(item, path, reader) select name); }