C# Class System.ComponentModel.PropertyDescriptor

Inheritance: MemberDescriptor
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
OnValueChanged ( object component, EventArgs e ) : void

Method Details

AddValueChanged() public méthode

Allows interested objects to be notified when this property changes.
public AddValueChanged ( object component, EventHandler handler ) : void
component object
handler EventHandler
Résultat void

CanResetValue() public abstract méthode

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
Résultat bool

CreateInstance() protected méthode

Creates an instance of the specified type.

protected CreateInstance ( Type type ) : object
type System.Type
Résultat object

Equals() public méthode

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
Résultat bool

FillAttributes() protected méthode

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
Résultat void

GetChildProperties() public méthode

[To be supplied.]

public GetChildProperties ( ) : PropertyDescriptorCollection
Résultat PropertyDescriptorCollection

GetChildProperties() public méthode

[To be supplied.]

public GetChildProperties ( Attribute filter ) : PropertyDescriptorCollection
filter System.Attribute
Résultat PropertyDescriptorCollection

GetChildProperties() public méthode

[To be supplied.]

public GetChildProperties ( object instance ) : PropertyDescriptorCollection
instance object
Résultat PropertyDescriptorCollection

GetChildProperties() public méthode

Retrieves the properties
public GetChildProperties ( object instance, Attribute filter ) : PropertyDescriptorCollection
instance object
filter System.Attribute
Résultat PropertyDescriptorCollection

GetEditor() public méthode

Gets an editor of the specified type.

public GetEditor ( Type editorBaseType ) : object
editorBaseType System.Type
Résultat object

GetHashCode() public méthode

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
Résultat int

GetInvocationTarget() protected méthode

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
Résultat object

GetTypeFromName() protected méthode

Gets a type using its name.

protected GetTypeFromName ( string typeName ) : Type
typeName string
Résultat System.Type

GetValue() public abstract méthode

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

public abstract GetValue ( object component ) : object
component object
Résultat object

GetValueChangedHandler() protected méthode

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
Résultat EventHandler

PropertyDescriptor() protected méthode

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

protected PropertyDescriptor ( MemberDescriptor descr ) : System.Collections
descr MemberDescriptor
Résultat System.Collections

PropertyDescriptor() protected méthode

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
Résultat System.Collections

PropertyDescriptor() protected méthode

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
Résultat System.Collections

RemoveValueChanged() public méthode

Allows interested objects to be notified when this property changes.
public RemoveValueChanged ( object component, EventHandler handler ) : void
component object
handler EventHandler
Résultat void

ResetValue() public abstract méthode

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

public abstract ResetValue ( object component ) : void
component object
Résultat void

SetValue() public abstract méthode

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
Résultat void

ShouldSerializeValue() public abstract méthode

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
Résultat bool