[Mono-bugs] [Bug 59587][Wis] New - Attributes on events in System.Data.SqlClient

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 4 Jun 2004 01:26:47 -0400 (EDT)


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 gonzalo@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=59587

--- shadow/59587	2004-06-04 01:26:47.000000000 -0400
+++ shadow/59587.tmp.22412	2004-06-04 01:26:47.000000000 -0400
@@ -0,0 +1,59 @@
+Bug#: 59587
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Attributes on events in System.Data.SqlClient
+
+The code in System.Data.SqlClient.SqlConnection has this:
+	[DataCategory ("InfoMessage")]
+	[DataSysDescription ("Event triggered when messages arrive from the
+DataSource.")]
+	public event SqlInfoMessageEventHandler InfoMessage;
+
+	[DataCategory ("StateChange")]
+	[DataSysDescription ("Event triggered when the connection changes state.")]
+	public event StateChangeEventHandler StateChange;
+
+However, this program doesn't output anything (it does under MS runtime):
+---
+using System;
+using System.Data.SqlClient;
+using System.Reflection;
+
+class Test {
+        static void Main ()
+        {
+                Type type = typeof (SqlConnection);
+                EventInfo evt = type.GetEvent ("InfoMessage");
+                Console.WriteLine ("InfoMessage attributes:");
+                object [] atts = evt.GetCustomAttributes (false);
+                foreach (object o in atts)
+                        Console.WriteLine ("\t{0}", o.GetType ());
+
+                evt = type.GetEvent ("StateChange");
+                Console.WriteLine ("StateChange attributes:");
+                atts = evt.GetCustomAttributes (false);
+                foreach (object o in atts)
+                        Console.WriteLine ("\t{0}", o.GetType ());
+        }
+}
+
+---
+
+
+monodis --customattr System.Data.dll
+
+prints quite a few: ** (process:21799): WARNING **: Type 1c not handled in
+custom attr value decoding