C# Класс System.ComponentModel.PropertyDescriptor

Наследование: MemberDescriptor
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddValueChanged ( object component, EventHandler handler ) : void

Allows interested objects to be notified when this property changes.

CanResetValue ( object component ) : bool

When overridden in a derived class, indicates whether resetting the component will change the value of the component.

Equals ( object obj ) : bool

Compares this to another to see if they are equivalent. NOTE: If you make a change here, you likely need to change GetHashCode() as well.

GetChildProperties ( ) : PropertyDescriptorCollection

[To be supplied.]

GetChildProperties ( Attribute filter ) : PropertyDescriptorCollection

[To be supplied.]

GetChildProperties ( object instance ) : PropertyDescriptorCollection

[To be supplied.]

GetChildProperties ( object instance, Attribute filter ) : PropertyDescriptorCollection

Retrieves the properties

GetEditor ( Type editorBaseType ) : object

Gets an editor of the specified type.

GetHashCode ( ) : int

Try to keep this reasonable in [....] with Equals(). Specifically, if A.Equals(B) returns true, A & B should have the same hash code.

GetValue ( object component ) : object

When overridden in a derived class, gets the current value of the property on a component.

RemoveValueChanged ( object component, EventHandler handler ) : void

Allows interested objects to be notified when this property changes.

ResetValue ( object component ) : void

When overridden in a derived class, resets the value for this property of the component.

SetValue ( object component, object value ) : void

When overridden in a derived class, sets the value of the component to a different value.

ShouldSerializeValue ( object component ) : bool

When overridden in a derived class, indicates whether the value of this property needs to be persisted.

Защищенные методы

Метод Описание
CreateInstance ( Type type ) : object

Creates an instance of the specified type.

FillAttributes ( IList attributeList ) : void

In an inheriting class, adds the attributes of the inheriting class to the specified list of attributes in the parent class. For duplicate attributes, the last one added to the list will be kept.

GetInvocationTarget ( Type type, object instance ) : object

This method returns the object that should be used during invocation of members. Normally the return value will be the same as the instance passed in. If someone associated another object with this instance, or if the instance is a custom type descriptor, GetInvocationTarget may return a different value.

GetTypeFromName ( string typeName ) : Type

Gets a type using its name.

GetValueChangedHandler ( object component ) : EventHandler

Return current set of ValueChanged event handlers for a specific component, in the form of a combined multicast event handler. Returns null if no event handlers currently assigned to component.

PropertyDescriptor ( MemberDescriptor descr ) : System.Collections

Initializes a new instance of the class with the name and attributes in the specified .

PropertyDescriptor ( MemberDescriptor descr, Attribute attrs ) : System.Collections

Initializes a new instance of the class with the name in the specified and the attributes in both the and the array.

PropertyDescriptor ( string name, Attribute attrs ) : System.Collections

Initializes a new instance of the class with the specified name and attributes.

Приватные методы

Метод Описание
OnValueChanged ( object component, EventArgs e ) : void

Описание методов

AddValueChanged() публичный Метод

Allows interested objects to be notified when this property changes.
public AddValueChanged ( object component, EventHandler handler ) : void
component object
handler EventHandler
Результат void

CanResetValue() публичный абстрактный Метод

When overridden in a derived class, indicates whether resetting the component will change the value of the component.

public abstract CanResetValue ( object component ) : bool
component object
Результат bool

CreateInstance() защищенный Метод

Creates an instance of the specified type.

protected CreateInstance ( Type type ) : object
type System.Type
Результат object

Equals() публичный Метод

Compares this to another to see if they are equivalent. NOTE: If you make a change here, you likely need to change GetHashCode() as well.

public Equals ( object obj ) : bool
obj object
Результат bool

FillAttributes() защищенный Метод

In an inheriting class, adds the attributes of the inheriting class to the specified list of attributes in the parent class. For duplicate attributes, the last one added to the list will be kept.
protected FillAttributes ( IList attributeList ) : void
attributeList IList
Результат void

GetChildProperties() публичный Метод

[To be supplied.]

public GetChildProperties ( ) : PropertyDescriptorCollection
Результат PropertyDescriptorCollection

GetChildProperties() публичный Метод

[To be supplied.]

public GetChildProperties ( Attribute filter ) : PropertyDescriptorCollection
filter System.Attribute
Результат PropertyDescriptorCollection

GetChildProperties() публичный Метод

[To be supplied.]

public GetChildProperties ( object instance ) : PropertyDescriptorCollection
instance object
Результат PropertyDescriptorCollection

GetChildProperties() публичный Метод

Retrieves the properties
public GetChildProperties ( object instance, Attribute filter ) : PropertyDescriptorCollection
instance object
filter System.Attribute
Результат PropertyDescriptorCollection

GetEditor() публичный Метод

Gets an editor of the specified type.

public GetEditor ( Type editorBaseType ) : object
editorBaseType System.Type
Результат object

GetHashCode() публичный Метод

Try to keep this reasonable in [....] with Equals(). Specifically, if A.Equals(B) returns true, A & B should have the same hash code.
public GetHashCode ( ) : int
Результат int

GetInvocationTarget() защищенный Метод

This method returns the object that should be used during invocation of members. Normally the return value will be the same as the instance passed in. If someone associated another object with this instance, or if the instance is a custom type descriptor, GetInvocationTarget may return a different value.
protected GetInvocationTarget ( Type type, object instance ) : object
type System.Type
instance object
Результат object

GetTypeFromName() защищенный Метод

Gets a type using its name.

protected GetTypeFromName ( string typeName ) : Type
typeName string
Результат System.Type

GetValue() публичный абстрактный Метод

When overridden in a derived class, gets the current value of the property on a component.

public abstract GetValue ( object component ) : object
component object
Результат object

GetValueChangedHandler() защищенный Метод

Return current set of ValueChanged event handlers for a specific component, in the form of a combined multicast event handler. Returns null if no event handlers currently assigned to component.
protected GetValueChangedHandler ( object component ) : EventHandler
component object
Результат EventHandler

PropertyDescriptor() защищенный Метод

Initializes a new instance of the class with the name and attributes in the specified .

protected PropertyDescriptor ( MemberDescriptor descr ) : System.Collections
descr MemberDescriptor
Результат System.Collections

PropertyDescriptor() защищенный Метод

Initializes a new instance of the class with the name in the specified and the attributes in both the and the array.

protected PropertyDescriptor ( MemberDescriptor descr, Attribute attrs ) : System.Collections
descr MemberDescriptor
attrs System.Attribute
Результат System.Collections

PropertyDescriptor() защищенный Метод

Initializes a new instance of the class with the specified name and attributes.

protected PropertyDescriptor ( string name, Attribute attrs ) : System.Collections
name string
attrs System.Attribute
Результат System.Collections

RemoveValueChanged() публичный Метод

Allows interested objects to be notified when this property changes.
public RemoveValueChanged ( object component, EventHandler handler ) : void
component object
handler EventHandler
Результат void

ResetValue() публичный абстрактный Метод

When overridden in a derived class, resets the value for this property of the component.

public abstract ResetValue ( object component ) : void
component object
Результат void

SetValue() публичный абстрактный Метод

When overridden in a derived class, sets the value of the component to a different value.

public abstract SetValue ( object component, object value ) : void
component object
value object
Результат void

ShouldSerializeValue() публичный абстрактный Метод

When overridden in a derived class, indicates whether the value of this property needs to be persisted.

public abstract ShouldSerializeValue ( object component ) : bool
component object
Результат bool