Example #1
0
        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());
        }
Example #2
0
        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);
            });
        }
Example #3
0
 public Specification FindSpecByLibraryName(string name)
 {
     return(AllSpecifications.FirstOrDefault(x => x.LibraryName == name));
 }