X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem%2FSystem.ComponentModel%2FMemberDescriptor.cs;h=5327f3444c60e79093fb57141f4f604558e7ea24;hb=c39145af2464b19374fac41b252e07480ae1a197;hp=f0a3c589a22fd3179acf0dde594d99901a87d8eb;hpb=33d2a980d34c4699192fb960caf7934c0b0922ce;p=mono.git diff --git a/mcs/class/System/System.ComponentModel/MemberDescriptor.cs b/mcs/class/System/System.ComponentModel/MemberDescriptor.cs index f0a3c589a22..5327f3444c6 100755 --- a/mcs/class/System/System.ComponentModel/MemberDescriptor.cs +++ b/mcs/class/System/System.ComponentModel/MemberDescriptor.cs @@ -9,7 +9,29 @@ // (C) 2003 Andreas Nahr // +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + using System; +using System.Collections; using System.Reflection; using System.Runtime.InteropServices; @@ -21,41 +43,52 @@ namespace System.ComponentModel { private string name; - private string displayName; private Attribute [] attrs; private AttributeCollection attrCollection; protected MemberDescriptor (string name, Attribute [] attrs) { this.name = name; - this.displayName = name; this.attrs = attrs; } protected MemberDescriptor (MemberDescriptor reference, Attribute [] attrs) { name = reference.name; - this.displayName = name; this.attrs = attrs; } protected MemberDescriptor (string name) { this.name = name; - this.displayName = name; } protected MemberDescriptor (MemberDescriptor reference) { name = reference.name; - this.displayName = name; - attrs = reference.attrs; + attrs = reference.AttributeArray; } protected virtual Attribute [] AttributeArray { get { + if (attrs == null) + { + ArrayList list = new ArrayList (); + FillAttributes (list); + + ArrayList filtered = new ArrayList (); + foreach (Attribute at in list) { + bool found = false; + for (int n=0; n