public void Add(Directive directive) { // TODO: Should there be rules for precedence, merging? if (!directives.ContainsKey(directive.Name)) directives.Add(directive.Name, directive); }
private void ProcessDirective(IInvocationExpression invokedExpression, string identifier, int offset) { if (invokedExpression.Arguments.Count != 2) return; var restrictions = CalculateRestrictions(invokedExpression); // Directives declared in code cannot be applied to just a single tag var tags = new string[0]; var directive = new Directive(identifier, DirectiveUtil.GetNormalisedName(identifier), restrictions, tags, offset, new List<Parameter>()); cacheItemsBuilder.Add(directive); }
public void Add(Directive directive) { directives.Add(directive); }