void ExportProperty(CodeTypeDeclaration codeClass, MemberMapping member, string ns, CodeIdentifiers memberScope, CodeConstructor ctor) {
string fieldName = memberScope.AddUnique(MakeFieldName(member.Name), member);
string fieldType = member.GetTypeName(CodeProvider);
// need to create a private field
CodeMemberField field = new CodeMemberField(fieldType, fieldName);
field.Attributes = MemberAttributes.Private;
codeClass.Members.Add(field);
CodeMemberProperty prop = CreatePropertyDeclaration(field, member.Name, fieldType);
prop.Comments.Add(new CodeCommentStatement(Res.GetString(Res.XmlRemarks), true));
AddMemberMetadata(field, prop.CustomAttributes, member, ns, false, prop.Comments, ctor);
codeClass.Members.Add(prop);
if (member.CheckSpecified) {
field = new CodeMemberField(typeof(bool).FullName, fieldName + "Specified");
field.Attributes = MemberAttributes.Private;
codeClass.Members.Add(field);
prop = CreatePropertyDeclaration(field, member.Name + "Specified", typeof(bool).FullName);
prop.Comments.Add(new CodeCommentStatement(Res.GetString(Res.XmlRemarks), true));
CodeAttributeDeclaration attribute = new CodeAttributeDeclaration(typeof(XmlIgnoreAttribute).FullName);
prop.CustomAttributes.Add(attribute);
codeClass.Members.Add(prop);
}
}