AttributeSectionCollection VisitAttributes(ArrayList attributes) { // TODO Expressions??? AttributeSectionCollection result = new AttributeSectionCollection(); foreach (AST.AttributeSection section in attributes) { AttributeCollection resultAttributes = new AttributeCollection(); foreach (AST.Attribute attribute in section.Attributes) { IAttribute a = new ASTAttribute(attribute.Name, new ArrayList(attribute.PositionalArguments), new SortedList()); foreach (AST.NamedArgument n in attribute.NamedArguments) { a.NamedArguments[n.Name] = n.Expr; } } IAttributeSection s = new AttributeSection((AttributeTarget)Enum.Parse(typeof (AttributeTarget), section.AttributeTarget), resultAttributes); } return null; }
AttributeSectionCollection VisitAttributes(ArrayList attributes) { // TODO Expressions??? AttributeSectionCollection result = new AttributeSectionCollection(); foreach (AST.AttributeSection section in attributes) { AttributeCollection resultAttributes = new AttributeCollection(); foreach (AST.Attribute attribute in section.Attributes) { IAttribute a = new ASTAttribute(attribute.Name, new ArrayList(attribute.PositionalArguments), new SortedList()); foreach (AST.NamedArgument n in attribute.NamedArguments) { a.NamedArguments[n.Name] = n.Expr; } } IAttributeSection s = new AttributeSection((AttributeTarget)Enum.Parse(typeof(AttributeTarget), section.AttributeTarget), resultAttributes); } return(null); }