void AddStyleFiles(string projectBasePath, string directory, string filter) { var scanner = new StyleScanner(); var files = Directory.GetFiles(directory, filter); if (filter == "*.css") { files = files.Where(f => StyleFinderUtils.IsCompiledFromLess(f) == false).ToArray(); } foreach (var file in files) { using (var content = File.OpenText(file)) { var classes = scanner.ExtractClasses(new StyleFinderFileInfoDto { FileContent = content.ReadToEnd(), FileName = file, ProjectBasePath = projectBasePath }); Repository.AppendRange(classes); } } }
public StyleTag() { ThisScanner = new StyleScanner(); }