Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​ComponentModel.​MemberDescriptor

Assembly: System.ComponentModel.TypeConverter

Inheritance: object → MemberDescriptor

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

Properties

protected Attribute[]
AttributeArray
Gets or sets an array of attributes.
Attributes
Gets the collection of attributes for this member.
public string
Category
Gets the name of the category to which the member belongs, as specified in the <see cref="T:System.ComponentModel.CategoryAttribute" /> .
public string
Description
Gets the description of the member, as specified in the <see cref="T:System.ComponentModel.DescriptionAttribute" /> .
public bool
DesignTimeOnly
Gets whether this member should be set only at design time, as specified in the <see cref="T:System.ComponentModel.DesignOnlyAttribute" /> .
public string
DisplayName
Gets the name that can be displayed in a window, such as a Properties window.
public bool
IsBrowsable
Gets a value indicating whether the member is browsable, as specified in the <see cref="T:System.ComponentModel.BrowsableAttribute" /> .
public string
Name
Gets the name of the member.
protected int
NameHashCode
Gets the hash code for the name of the member, as specified in <see cref="M:System.String.GetHashCode" /> .

Methods

CreateAttributeCollection​()
Creates a collection of attributes using the array of attributes passed to the constructor.
Returns A new <see cref="T:System.ComponentModel.AttributeCollection" /> that contains the <see cref="P:System.ComponentModel.MemberDescriptor.AttributeArray" /> attributes.
public bool
Equals​(object obj)
Compares this instance to the given object to see if they are equivalent.
Returns <see langword="true" /> if equivalent; otherwise, <see langword="false" /> .
obj The object to compare to the current instance.
protected void
FillAttributes​(Collections.​IList attributeList)
When overridden in a derived class, adds the attributes of the inheriting class to the specified list of attributes in the parent class.
attributeList An <see cref="T:System.Collections.IList" /> that lists the attributes in the parent class. Initially, this is empty.
protected static Reflection.​MethodInfo
FindMethod​(Type componentClass, string name, Type[] args, Type returnType)
Finds the given method through reflection, searching only for public methods.
Returns A <see cref="T:System.Reflection.MethodInfo" /> that represents the method, or <see langword="null" /> if the method is not found.
componentClass The component that contains the method.
name The name of the method to find.
args An array of parameters for the method, used to choose between overloaded methods.
returnType The type to return for the method.
protected static Reflection.​MethodInfo
FindMethod​(Type componentClass, string name, Type[] args, Type returnType, bool publicOnly)
Finds the given method through reflection, with an option to search only public methods.
Returns A <see cref="T:System.Reflection.MethodInfo" /> that represents the method, or <see langword="null" /> if the method is not found.
componentClass The component that contains the method.
name The name of the method to find.
args An array of parameters for the method, used to choose between overloaded methods.
returnType The type to return for the method.
publicOnly Whether to restrict search to public methods.
public int
GetHashCode​()
Returns the hash code for this instance.
Returns A hash code for the current <see cref="T:System.ComponentModel.MemberDescriptor" /> .
protected object
GetInvocationTarget​(Type type, object instance)
Retrieves the object that should be used during invocation of members.
Returns The object to be used during member invocations.
type The <see cref="T:System.Type" /> of the invocation target.
instance The potential invocation target.
protected static object
GetInvokee​(Type componentClass, object component)
Gets the component on which to invoke a method.
Returns An instance of the component to invoke. This method returns a visual designer when the property is attached to a visual designer.
componentClass A <see cref="T:System.Type" /> representing the type of component this <see cref="T:System.ComponentModel.MemberDescriptor" /> is bound to. For example, if this <see cref="T:System.ComponentModel.MemberDescriptor" /> describes a property, this parameter should be the class that the property is declared on.
component An instance of the object to call.
protected static ISite
GetSite​(object component)
Gets a component site for the given component.
Returns The site of the component, or <see langword="null" /> if a site does not exist.
component The component for which you want to find a site.
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object