MemberDescriptor MemberDescriptor MemberDescriptor MemberDescriptor Class

Definition

Represents a class member, such as a property or event. This is an abstract base class.

public ref class MemberDescriptor abstract
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class MemberDescriptor
type MemberDescriptor = class
Public MustInherit Class MemberDescriptor
Inheritance
MemberDescriptorMemberDescriptorMemberDescriptorMemberDescriptor
Derived
Attributes

Examples

Since most of the usage of this class will fall on the inherited classes EventDescriptor and PropertyDescriptor, refer to the examples in these classes.

Remarks

MemberDescriptor is the base class for the EventDescriptor and the PropertyDescriptor classes. The EventDescriptor class provides a description of an event, and the PropertyDescriptor class provides a description of a property.

This class defines properties and methods to access its stored attributes. The Attributes property gets the collection of attributes. The Category, IsBrowsable, Description, and DesignTimeOnly properties retrieve the values of those specific attributes. The Name and DisplayName properties provide the name of the member.

The MemberDescriptor also defines an Equals method to compare this MemberDescriptor to another.

Note

Typically, you inherit from the EventDescriptor and PropertyDescriptor classes, and not from this class.

Constructors

MemberDescriptor(MemberDescriptor) MemberDescriptor(MemberDescriptor) MemberDescriptor(MemberDescriptor) MemberDescriptor(MemberDescriptor)

Initializes a new instance of the MemberDescriptor class with the specified MemberDescriptor.

MemberDescriptor(MemberDescriptor, Attribute[]) MemberDescriptor(MemberDescriptor, Attribute[]) MemberDescriptor(MemberDescriptor, Attribute[]) MemberDescriptor(MemberDescriptor, Attribute[])

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

MemberDescriptor(String) MemberDescriptor(String) MemberDescriptor(String) MemberDescriptor(String)

Initializes a new instance of the MemberDescriptor class with the specified name of the member.

MemberDescriptor(String, Attribute[]) MemberDescriptor(String, Attribute[]) MemberDescriptor(String, Attribute[]) MemberDescriptor(String, Attribute[])

Initializes a new instance of the MemberDescriptor class with the specified name of the member and an array of attributes.

Properties

AttributeArray AttributeArray AttributeArray AttributeArray

Gets or sets an array of attributes.

Attributes Attributes Attributes Attributes

Gets the collection of attributes for this member.

Category Category Category Category

Gets the name of the category to which the member belongs, as specified in the CategoryAttribute.

Description Description Description Description

Gets the description of the member, as specified in the DescriptionAttribute.

DesignTimeOnly DesignTimeOnly DesignTimeOnly DesignTimeOnly

Gets whether this member should be set only at design time, as specified in the DesignOnlyAttribute.

DisplayName DisplayName DisplayName DisplayName

Gets the name that can be displayed in a window, such as a Properties window.

IsBrowsable IsBrowsable IsBrowsable IsBrowsable

Gets a value indicating whether the member is browsable, as specified in the BrowsableAttribute.

Name Name Name Name

Gets the name of the member.

NameHashCode NameHashCode NameHashCode NameHashCode

Gets the hash code for the name of the member, as specified in GetHashCode().

Methods

CreateAttributeCollection() CreateAttributeCollection() CreateAttributeCollection() CreateAttributeCollection()

Creates a collection of attributes using the array of attributes passed to the constructor.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Compares this instance to the given object to see if they are equivalent.

FillAttributes(IList) FillAttributes(IList) FillAttributes(IList) FillAttributes(IList)

When overridden in a derived class, adds the attributes of the inheriting class to the specified list of attributes in the parent class.

FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type) FindMethod(Type, String, Type[], Type)

Finds the given method through reflection, searching only for public methods.

FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean) FindMethod(Type, String, Type[], Type, Boolean)

Finds the given method through reflection, with an option to search only public methods.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for this instance.

GetInvocationTarget(Type, Object) GetInvocationTarget(Type, Object) GetInvocationTarget(Type, Object) GetInvocationTarget(Type, Object)

Retrieves the object that should be used during invocation of members.

GetInvokee(Type, Object) GetInvokee(Type, Object) GetInvokee(Type, Object) GetInvokee(Type, Object)

Gets the component on which to invoke a method.

GetSite(Object) GetSite(Object) GetSite(Object) GetSite(Object)

Gets a component site for the given component.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See Also