Example #1
0
        internal static AttributeNode AddMethodCallingToAttributeValue(AttributeNode node, string method)
        {
            var snippets = new Snippets {new Snippet {Value = method + "("}};
            snippets.AddRange(node.AsCodeInverted());
            snippets.Add(new Snippet {Value= ")"});

            var builder = new ExpressionBuilder();
            builder.AppendExpression(snippets);
            var listNodes=new List<Node> {new ExpressionNode(snippets)};
            return new AttributeNode(node.Name, listNodes);
        }
        public SnippetGeneratorResult(
            List <Snippet> snippets,
            string name,
            Language language,
            bool isDevelopment = false,
            params string[] tags)
        {
            Snippets.AddRange(snippets);
            Path          = name;
            Language      = language;
            IsDevelopment = isDevelopment;

            if (tags != null)
            {
                Tags.AddRange(tags);
            }
        }