internal static void ExportConstant(CodeTypeDeclaration codeClass, ConstantMapping constant, Type type, bool init, long enumValue) {
CodeMemberField field = new CodeMemberField(typeof(int).FullName, constant.Name);
field.Comments.Add(new CodeCommentStatement(Res.GetString(Res.XmlRemarks), true));
if (init)
field.InitExpression = new CodePrimitiveExpression(enumValue);
codeClass.Members.Add(field);
if (constant.XmlName != constant.Name) {
CodeAttributeDeclaration attribute = new CodeAttributeDeclaration(type.FullName);
attribute.Arguments.Add(new CodeAttributeArgument(new CodePrimitiveExpression(constant.XmlName)));
field.CustomAttributes.Add(attribute);
}
}