[Mono-bugs] [Bug 75846][Maj] New - PropertyDescriptor does not show attributes on an overridden property

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 19 01:05:18 EDT 2005


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 at ximian.com.

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

--- shadow/75846	2005-08-19 01:05:18.000000000 -0400
+++ shadow/75846.tmp.3067	2005-08-19 01:05:18.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 75846
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gonzalo at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: PropertyDescriptor does not show attributes on an overridden property
+
+[From  Michael Hutchinson in mono-devel]
+-------------------------------------
+I have found a bug where the Attributes collection provided by
+System.ComponentModel.PropertyDescriptor does not show attributes on
+an overridden property.
+
+Test case:
+*************
+
+using System.ComponentModel;
+using System;
+
+class Test
+{
+        static void Main()
+        {
+                foreach (PropertyDescriptor pd in
+TypeDescriptor.GetProperties (new
+OverridingClass ()))
+                        foreach (Attribute att in pd.Attributes)
+                                Console.WriteLine (att.GetType ().ToString ());
+        }
+        
+        class BaseClass
+        {
+                [Browsable (false)]
+                public virtual bool Test {
+                        get { return true; }
+                }               
+        }
+        
+        class OverridingClass : BaseClass
+        {
+                public override bool Test {
+                        get { return base.Test; }
+                }
+        }       
+}
+
+*************
+
+On. .NET 1.1 SP1 we get the output:
+
+System.ComponentModel.ReadOnlyAttribute
+
+System.CLSCompliantAttribute
+
+System.ComponentModel.BrowsableAttribute
+
+But on Mono we get nothing.
+
+
+---------------


More information about the mono-bugs mailing list