internal Expression ContextAttributeConstructor(AttributeList attrs)
{
AttributeNode contextAttr = this.GetContextAttribute(attrs);
if (contextAttr == null)
return new Literal(null, SystemTypes.Object);
Duplicator duplicator = new Duplicator(null, null);
AttributeNode dupAttr = duplicator.VisitAttributeNode(contextAttr);
Construct cons = (Construct)Templates.GetExpressionTemplate("ContextAttributeConstructor");
Replacer.Replace(cons, "_AttributeName", dupAttr.Type.Name);
Normalizer normalizer = new Normalizer(false);
cons.Operands = normalizer.VisitExpressionList(dupAttr.Expressions);
return cons;
}