using System; using System.Collections; using System.Reflection; namespace System.ComponentModel { // Token: 0x020000D5 RID: 213 internal class TypeInfo : Info { // Token: 0x0600073D RID: 1853 RVA: 0x000139D0 File Offset: 0x00011BD0 public TypeInfo(Type t) : base(t) { } // Token: 0x0600073E RID: 1854 RVA: 0x000139DC File Offset: 0x00011BDC public override AttributeCollection GetAttributes() { return base.GetAttributes(null); } // Token: 0x0600073F RID: 1855 RVA: 0x000139E8 File Offset: 0x00011BE8 public override EventDescriptorCollection GetEvents() { if (this._events != null) { return this._events; } EventInfo[] events = base.InfoType.GetEvents(); EventDescriptor[] array = new EventDescriptor[events.Length]; for (int i = 0; i < events.Length; i++) { array[i] = new ReflectionEventDescriptor(events[i]); } this._events = new EventDescriptorCollection(array); return this._events; } // Token: 0x06000740 RID: 1856 RVA: 0x00013A50 File Offset: 0x00011C50 public override PropertyDescriptorCollection GetProperties() { if (this._properties != null) { return this._properties; } Hashtable hashtable = new Hashtable(); ArrayList arrayList = new ArrayList(); Type type = base.InfoType; while (type != null && type != typeof(object)) { PropertyInfo[] properties = type.GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public); foreach (PropertyInfo propertyInfo in properties) { if (propertyInfo.GetIndexParameters().Length == 0 && propertyInfo.CanRead && !hashtable.ContainsKey(propertyInfo.Name)) { arrayList.Add(new ReflectionPropertyDescriptor(propertyInfo)); hashtable.Add(propertyInfo.Name, null); } } type = type.BaseType; } this._properties = new PropertyDescriptorCollection((PropertyDescriptor[])arrayList.ToArray(typeof(PropertyDescriptor)), true); return this._properties; } // Token: 0x04000210 RID: 528 private EventDescriptorCollection _events; // Token: 0x04000211 RID: 529 private PropertyDescriptorCollection _properties; } }