コード例 #1
0
 public void Add(Directive directive)
 {
     // TODO: Should there be rules for precedence, merging?
     if (!directives.ContainsKey(directive.Name))
         directives.Add(directive.Name, directive);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void Add(Directive directive)
 {
     directives.Add(directive);
 }