protected override void PreFilterAttributes(System.Collections.IDictionary attributes) { base.PreFilterAttributes(attributes); if (!DesignerFeaturesEnabled) { return; } TargetControlTypeAttribute targetCtrlTypeAttribute = (TargetControlTypeAttribute)TypeDescriptor.GetAttributes(this)[typeof(TargetControlTypeAttribute)]; if (targetCtrlTypeAttribute != null && !targetCtrlTypeAttribute.IsDefaultAttribute()) { attributes[typeof(TargetControlTypeAttribute)] = targetCtrlTypeAttribute; } }
protected override void PreFilterProperties(System.Collections.IDictionary properties) { base.PreFilterProperties(properties); if (!DesignerFeaturesEnabled) { return; } string[] propertyNames = new string[properties.Keys.Count]; properties.Keys.CopyTo(propertyNames, 0); foreach (string propertyName in propertyNames) { PropertyDescriptor pd = (PropertyDescriptor)properties[propertyName]; if (propertyName == "TargetControlID") { // get the control type. // TargetControlTypeAttribute targetControlType = (TargetControlTypeAttribute)TypeDescriptor.GetAttributes(ExtenderControl)[typeof(TargetControlTypeAttribute)]; if (targetControlType != null && !targetControlType.IsDefaultAttribute()) { Type genericType = typeof(TypedControlIDConverter <>).MakeGenericType(targetControlType.TargetControlType); properties[propertyName] = TypeDescriptor.CreateProperty(pd.ComponentType, pd, new TypeConverterAttribute(genericType)); } } ExtenderControlPropertyAttribute extenderPropAttr = (ExtenderControlPropertyAttribute)pd.Attributes[typeof(ExtenderControlPropertyAttribute)]; if (extenderPropAttr == null || !extenderPropAttr.IsScriptProperty) { continue; } BrowsableAttribute browsableAttr = (BrowsableAttribute)pd.Attributes[typeof(BrowsableAttribute)]; if (browsableAttr.Browsable == BrowsableAttribute.Yes.Browsable) { properties[propertyName] = TypeDescriptor.CreateProperty(pd.ComponentType, pd, BrowsableAttribute.No, ExtenderVisiblePropertyAttribute.Yes); } } }
// Token: 0x06000048 RID: 72 RVA: 0x00002920 File Offset: 0x00000B20 protected override void PreFilterProperties(IDictionary properties) { base.PreFilterProperties(properties); string[] array = new string[properties.Keys.Count]; properties.Keys.CopyTo(array, 0); foreach (string text in array) { PropertyDescriptor propertyDescriptor = (PropertyDescriptor)properties[text]; if (text == "TargetControlID") { TargetControlTypeAttribute targetControlTypeAttribute = (TargetControlTypeAttribute)TypeDescriptor.GetAttributes(this.ExtenderControl)[typeof(TargetControlTypeAttribute)]; if (targetControlTypeAttribute != null && !targetControlTypeAttribute.IsDefaultAttribute()) { Type type = typeof(TypedControlIDConverter <>).MakeGenericType(new Type[] { targetControlTypeAttribute.TargetControlType }); properties[text] = TypeDescriptor.CreateProperty(propertyDescriptor.ComponentType, propertyDescriptor, new Attribute[] { new TypeConverterAttribute(type) }); } } ExtenderControlPropertyAttribute extenderControlPropertyAttribute = (ExtenderControlPropertyAttribute)propertyDescriptor.Attributes[typeof(ExtenderControlPropertyAttribute)]; if (extenderControlPropertyAttribute != null && extenderControlPropertyAttribute.IsScriptProperty) { BrowsableAttribute browsableAttribute = (BrowsableAttribute)propertyDescriptor.Attributes[typeof(BrowsableAttribute)]; if (browsableAttribute.Browsable == BrowsableAttribute.Yes.Browsable) { properties[text] = TypeDescriptor.CreateProperty(propertyDescriptor.ComponentType, propertyDescriptor, new Attribute[] { BrowsableAttribute.No, ExtenderVisiblePropertyAttribute.Yes }); } } } }