зеркало из https://github.com/mono/mail-archives.git
134 строки
5.2 KiB
HTML
134 строки
5.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 77501][Nor] New - Numeric value for enum is
|
|
serialized as primitive type
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077501%5D%5BNor%5D%20New%20-%20Numeric%20value%20for%20enum%20is%0A%09serialized%20as%20primitive%20type&In-Reply-To=bug-77501%40chernobyl.ximian.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="039064.html">
|
|
<LINK REL="Next" HREF="039066.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 77501][Nor] New - Numeric value for enum is
|
|
serialized as primitive type</H1>
|
|
<B>bugzilla-daemon at bugzilla.ximian.com</B>
|
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2077501%5D%5BNor%5D%20New%20-%20Numeric%20value%20for%20enum%20is%0A%09serialized%20as%20primitive%20type&In-Reply-To=bug-77501%40chernobyl.ximian.com"
|
|
TITLE="[Mono-bugs] [Bug 77501][Nor] New - Numeric value for enum is
|
|
serialized as primitive type">bugzilla-daemon at bugzilla.ximian.com
|
|
</A><BR>
|
|
<I>Wed Feb 8 09:55:15 EST 2006</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="039064.html">[Mono-bugs] [Bug 77488][Nor] Changed - [gmcs] Exception when
|
|
compiling (NotSupportedException)
|
|
</A></li>
|
|
<LI>Next message: <A HREF="039066.html">[Mono-bugs] [Bug 77501][Nor] Changed - Numeric value for enum is
|
|
serialized as primitive type
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#39065">[ date ]</a>
|
|
<a href="thread.html#39065">[ thread ]</a>
|
|
<a href="subject.html#39065">[ subject ]</a>
|
|
<a href="author.html#39065">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Please do not reply to this email- if you want to comment on the bug, go to the
|
|
URL shown below and enter your comments there.
|
|
|
|
Changed by <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gert.driesen at pandora.be.</A>
|
|
|
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=77501">http://bugzilla.ximian.com/show_bug.cgi?id=77501</A>
|
|
|
|
--- shadow/77501 2006-02-08 09:55:15.000000000 -0500
|
|
+++ shadow/77501.tmp.12870 2006-02-08 09:55:15.000000000 -0500
|
|
@@ -0,0 +1,60 @@
|
|
+Bug#: 77501
|
|
+Product: Mono: Class Libraries
|
|
+Version: 1.1
|
|
+OS:
|
|
+OS Details:
|
|
+Status: NEW
|
|
+Resolution:
|
|
+Severity:
|
|
+Priority: Normal
|
|
+Component: Sys.XML
|
|
+AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">atsushi at ximian.com</A>
|
|
+ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gert.driesen at pandora.be</A>
|
|
+QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
|
|
+TargetMilestone: ---
|
|
+URL:
|
|
+Cc:
|
|
+Summary: Numeric value for enum is serialized as primitive type
|
|
+
|
|
+The numeric value of an enum constant is wrongly serialized as as
|
|
+primitive type (xsi type).
|
|
+
|
|
+This is a simple bug, but I need to get this to behave like the MSFT
|
|
+implementation before I can add additional unit tests for
|
|
+System.Xml.Serialization. This is why I didn't set the priority
|
|
+to "Minor".
|
|
+
|
|
+To reproduce, compile and run the following code snippet:
|
|
+
|
|
+using System;
|
|
+using System.Xml.Serialization;
|
|
+
|
|
+public class Test
|
|
+{
|
|
+ static void Main ()
|
|
+ {
|
|
+ XmlSerializer xs = new XmlSerializer (typeof (EnumDefaultValueNF));
|
|
+ xs.Serialize (Console.Out, (int) EnumDefaultValueNF.e1);
|
|
+ }
|
|
+ public enum EnumDefaultValueNF { e1 = 1, e2 = 2, e3 = 3 }
|
|
+}
|
|
+
|
|
+Actual result:
|
|
+
|
|
+<?xml version="1.0" encoding="iso-8859-1"?>
|
|
+<EnumDefaultValueNF xmlns:q1="<A HREF="http://www.w3.org/2001/XMLSchema"">http://www.w3.org/2001/XMLSchema"</A>
|
|
+d1p1:type="q1:int" xmlns:d1p1="<A HREF="http://www.w3.org/2001/XMLSchema-">http://www.w3.org/2001/XMLSchema-</A>
|
|
+instance">1</EnumDefaultValueNF>
|
|
+
|
|
+Expected result:
|
|
+
|
|
+<?xml version="1.0" encoding="iso-8859-1"?>
|
|
+<EnumDefaultValueNF>1</EnumDefaultValueNF>
|
|
+
|
|
+Note: we should in fact get this, but I'll file a separate bug report for
|
|
+that:
|
|
+
|
|
+<?xml version="1.0" encoding="iso-8859-1"?>
|
|
+<EnumDefaultValueNF>e1</EnumDefaultValueNF>
|
|
+
|
|
+(note that the constant name is output, not its integral value)
|
|
</PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="039064.html">[Mono-bugs] [Bug 77488][Nor] Changed - [gmcs] Exception when
|
|
compiling (NotSupportedException)
|
|
</A></li>
|
|
<LI>Next message: <A HREF="039066.html">[Mono-bugs] [Bug 77501][Nor] Changed - Numeric value for enum is
|
|
serialized as primitive type
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#39065">[ date ]</a>
|
|
<a href="thread.html#39065">[ thread ]</a>
|
|
<a href="subject.html#39065">[ subject ]</a>
|
|
<a href="author.html#39065">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
|
mailing list</a><br>
|
|
</body></html>
|