public Library(Rule rule) : base(rule) { }
public ProductInfo(Rule rule) : base(rule) { }
public Link(Rule rule) : base(rule) { }
public FileGroup(Rule rule) : base(rule) { Files = new DictionaryProperty(Rule, "files"); }
public Event(Rule rule) : base(rule) { }
public Process(Rule rule) : base(rule) { }
public SpecFile() { FileGroups = new Indexer<FileGroup>( () => from rule in FileGroupRules select rule.Parameter ?? rule.Name, ruleName => from rule in FileGroupRules where (rule.Name == ruleName || rule.Parameter == ruleName) select rule, ruleName => { var rule = new Rule { Name = ruleName }; _rules.Add(rule.FullSelector, rule); return rule; }); Processes = new Indexer<Process>( () => from rule in ProcessRules select rule.Parameter, parameter => from rule in ProcessRules where rule.Parameter.Equals( parameter, StringComparison.CurrentCultureIgnoreCase) select rule, parameter => { var rule = new Rule { Class = "process", Parameter = parameter }; _rules.Add(rule.FullSelector, rule); return rule; }); Events = new Indexer<Event>( () => from rule in EventRules select rule.Id, id => from rule in EventRules where rule.Id == id select rule, id => { var rule = new Rule { Class = "event", Id = EventRules.Max(each => each.Id)+1 }; _rules.Add(rule.FullSelector, rule); return rule; }); Libraries = new Indexer<Library>( () => from rule in LibraryRules select rule.Parameter, parameter => from rule in LibraryRules where rule.Parameter == parameter select rule, parameter => { var rule =new Rule { Name = "library", Parameter = parameter }; _rules.Add(rule.FullSelector, rule); return rule; }); _link= new Indexer<Link>( () => "unique".SingleItemAsEnumerable(), unique => LinkRules, unique => { var rule = new Rule { Class = "link" }; _rules.Add(rule.FullSelector, rule); return rule; }); _productInfo= new Indexer<ProductInfo>( () => "unique".SingleItemAsEnumerable(), unique => ProductInfoRules, unique => { var rule = new Rule { Id = "product-info" }; _rules.Add(rule.FullSelector, rule); return rule; }); }