17 private object[] editors;
19 private Type[] editorTypes;
21 private int editorCount;
37 if (converter ==
null)
43 if (typeFromName !=
null && typeof(
TypeConverter).IsAssignableFrom(typeFromName))
48 if (converter ==
null)
77 return designerSerializationVisibilityAttribute.
Visibility;
123 if (component ==
null)
131 if (valueChangedHandlers ==
null)
183 if (constructor !=
null)
201 base.FillAttributes(attributeList);
233 if (instance ==
null)
247 if (editorTypes !=
null)
249 for (
int i = 0; i < editorCount; i++)
251 if (editorTypes[i] == editorBaseType)
259 for (
int j = 0; j < attributes.
Count; j++)
262 if (editorAttribute ==
null)
267 if (editorBaseType == typeFromName)
270 if (typeFromName2 !=
null)
281 if (editorTypes ==
null)
283 editorTypes =
new Type[5];
284 editors =
new object[5];
286 if (editorCount >= editorTypes.Length)
288 Type[] destinationArray =
new Type[editorTypes.Length * 2];
289 object[] destinationArray2 =
new object[editors.Length * 2];
290 Array.
Copy(editorTypes, destinationArray, editorTypes.Length);
291 Array.
Copy(editors, destinationArray2, editors.Length);
292 editorTypes = destinationArray;
293 editors = destinationArray2;
295 editorTypes[editorCount] = editorBaseType;
296 editors[editorCount++] = obj;
314 object obj = base.GetInvocationTarget(type, instance);
316 if (customTypeDescriptor !=
null)
328 if (typeName ==
null || typeName.Length == 0)
336 int num = typeName.IndexOf(
',');
339 typeName = typeName.Substring(0, num);
343 return type2 ?? type;
349 public abstract object GetValue(
object component);
356 if (component !=
null && valueChangedHandlers !=
null)
358 ((
EventHandler)valueChangedHandlers[component])?.Invoke(component, e);
369 if (component ==
null)
377 if (valueChangedHandlers !=
null)
383 valueChangedHandlers[component] = source;
387 valueChangedHandlers.
Remove(component);
397 if (component !=
null && valueChangedHandlers !=
null)
406 public abstract void ResetValue(
object component);
411 public abstract void SetValue(
object component,
object value);
int Count
Gets the number of attributes.
PropertyDescriptorCollection GetChildProperties(Attribute[] filter)
Returns a T:System.ComponentModel.PropertyDescriptorCollection using a specified array of attributes ...
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
PropertyDescriptor(MemberDescriptor descr, Attribute[] attrs)
Initializes a new instance of the T:System.ComponentModel.PropertyDescriptor class with the name in t...
PropertyDescriptor(string name, Attribute[] attrs)
Initializes a new instance of the T:System.ComponentModel.PropertyDescriptor class with the specified...
abstract bool ShouldSerializeValue(object component)
When overridden in a derived class, determines a value indicating whether the value of this property ...
override int GetHashCode()
Returns the hash code for this instance.
Provides an interface that supplies dynamic custom type information for an object.
static object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args)
Creates an object that can substitute for another data type.
Specifies the type of persistence to use when serializing a property on a component at design time.
virtual string FullName
Gets the display name of the assembly.
abstract Type PropertyType
When overridden in a derived class, gets the type of the property.
PropertyDescriptorCollection GetChildProperties(object instance)
Returns a T:System.ComponentModel.PropertyDescriptorCollection for a given object.
Represents a non-generic collection of objects that can be individually accessed by index.
static TypeConverter GetConverter(object component)
Returns a type converter for the type of the specified component.
static readonly LocalizableAttribute Yes
Specifies that a property should be localized. This static field is read-only.
Discovers the attributes of a class constructor and provides access to constructor metadata.
Represents the base class for custom attributes.
PropertyDescriptorCollection GetChildProperties()
Returns the default T:System.ComponentModel.PropertyDescriptorCollection.
virtual void RemoveValueChanged(object component, EventHandler handler)
Enables other objects to be notified when this property changes.
override bool Equals(object obj)
Returns whether the value of the given object is equal to the current T:System.ComponentModel....
ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
Searches for a constructor whose parameters match the specified argument types and modifiers,...
string EditorTypeName
Gets the name of the editor class in the P:System.Type.AssemblyQualifiedName format.
virtual object GetEditor(Type editorBaseType)
Gets an editor of the specified type.
Represents the base class for classes that contain event data, and provides a value to use for events...
static Delegate Remove(Delegate source, Delegate value)
Removes the last occurrence of the invocation list of a delegate from the invocation list of another ...
static Delegate Combine(Delegate a, Delegate b)
Concatenates the invocation lists of two delegates.
Provides an abstraction of a property on a class.
Specifies whether a property should be localized. This class cannot be inherited.
virtual string Name
Gets the name of the member.
abstract void SetValue(object component, object value)
When overridden in a derived class, sets the value of the component to a different value.
SecurityAction
Specifies the security actions that can be performed using declarative security.
string ConverterTypeName
Gets the fully qualified type name of the T:System.Type to use as a converter for the object this att...
Represents a class member, such as a property or event. This is an abstract base class.
static object GetEditor(object component, Type editorBaseType)
Gets an editor with the specified base type for the specified component.
string EditorBaseTypeName
Gets the name of the base class or interface serving as a lookup key for this editor.
delegate void EventHandler(object sender, EventArgs e)
Represents the method that will handle an event that has no event data.
Type GetTypeFromName(string typeName)
Returns a type using its name.
Represents a collection of key/value pairs that are organized based on the hash code of the key....
Specifies the editor to use to change a property. This class cannot be inherited.
DesignerSerializationVisibility Visibility
Gets a value indicating the basic serialization mode a serializer should use when determining whether...
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
abstract Assembly Assembly
Gets the T:System.Reflection.Assembly in which the type is declared. For generic types,...
virtual bool SupportsChangeEvents
Gets a value indicating whether value change notifications for this property may originate from outsi...
Represents a delegate, which is a data structure that refers to a static method or to a class instanc...
Represents type declarations: class types, interface types, array types, value types,...
Provides information about the characteristics for a component, such as its attributes,...
virtual TypeConverter Converter
Gets the type converter for this property.
override void FillAttributes(IList attributeList)
Adds the attributes of the T:System.ComponentModel.PropertyDescriptor to the specified list of attrib...
object CreateInstance(Type type)
Creates an instance of the specified type.
Represents a collection of attributes.
abstract object GetValue(object component)
When overridden in a derived class, gets the current value of the property on a component.
virtual PropertyDescriptorCollection GetChildProperties(object instance, Attribute[] filter)
Returns a T:System.ComponentModel.PropertyDescriptorCollection for a given object using a specified a...
internal EventHandler GetValueChangedHandler(object component)
Retrieves the current set of ValueChanged event handlers for a specific component
DesignerSerializationVisibility SerializationVisibility
Gets a value indicating whether this property should be serialized, as specified in the T:System....
virtual void OnValueChanged(object component, EventArgs e)
Raises the ValueChanged event that you implemented.
static void Copy(Array sourceArray, Array destinationArray, int length)
Copies a range of elements from an T:System.Array starting at the first element and pastes them into ...
static PropertyDescriptorCollection GetProperties(Type componentType)
Returns the collection of properties for a specified type of component.
virtual AttributeCollection Attributes
Gets the collection of attributes for this member.
Specifies what type to use as a converter for the object this attribute is bound to.
abstract bool CanResetValue(object component)
When overridden in a derived class, returns whether resetting an object changes its value.
DesignerSerializationVisibility
Specifies the visibility a property has to the design-time serializer.
virtual void Remove(object key)
Removes the element with the specified key from the T:System.Collections.Hashtable.
Represents a collection of T:System.ComponentModel.PropertyDescriptor objects.
abstract Type ComponentType
When overridden in a derived class, gets the type of the component this property is bound to.
PropertyDescriptor(MemberDescriptor descr)
Initializes a new instance of the T:System.ComponentModel.PropertyDescriptor class with the name and ...
override object GetInvocationTarget(Type type, object instance)
This method returns the object that should be used during invocation of members.
static Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Gets the T:System.Type with the specified name, specifying whether to throw an exception if the type ...
override int GetHashCode()
Returns the hash code for this object.
object GetPropertyOwner(PropertyDescriptor pd)
Returns an object that contains the property described by the specified property descriptor.
abstract bool IsReadOnly
When overridden in a derived class, gets a value indicating whether this property is read-only.
virtual void AddValueChanged(object component, EventHandler handler)
Enables other objects to be notified when this property changes.
abstract void ResetValue(object component)
When overridden in a derived class, resets the value for this property of the component to the defaul...
virtual bool IsLocalizable
Gets a value indicating whether this property should be localized, as specified in the T:System....
override bool Equals(object obj)
Compares this to another object to see if they are equivalent.
Provides a unified way of converting types of values to other types, as well as for accessing standar...
virtual int NameHashCode
Gets the hash code for the name of the member, as specified in M:System.String.GetHashCode.