void ExportAnyElement(CodeAttributeDeclarationCollection metadata, string name, string ns, int sequenceId) {
CodeAttributeDeclaration attribute = new CodeAttributeDeclaration(typeof(XmlAnyElementAttribute).FullName);
if (name != null && name.Length > 0) {
attribute.Arguments.Add(new CodeAttributeArgument("Name", new CodePrimitiveExpression(name)));
}
if (ns != null && ns.Length > 0) {
attribute.Arguments.Add(new CodeAttributeArgument("Namespace", new CodePrimitiveExpression(ns)));
}
if (sequenceId >= 0) {
attribute.Arguments.Add(new CodeAttributeArgument("Order", new CodePrimitiveExpression(sequenceId)));
}
metadata.Add(attribute);
}