public void ApplyHelpers() { var helper = _specifications.FirstOrDefault(x => x.LibraryName == Specification.HelperName); if (helper != null) { _specifications.Remove(helper); AllSpecifications.Each(x => x.AddLibrary(helper.File)); } _children.Each(x => x.ApplyHelpers()); }
private void associateSpecs(List <AssetFile> javascriptFiles) { var specs = AllSpecifications.ToList(); javascriptFiles.RemoveAll(file => specs.Any(x => x.File == file)); specs.Each(spec => { // Brute force baby! No elegance needed here. // Ten bucks says this is a perf problem down the line javascriptFiles.Where(spec.DependsOn).Each(spec.AddLibrary); }); }
public Specification FindSpecByLibraryName(string name) { return(AllSpecifications.FirstOrDefault(x => x.LibraryName == name)); }