Class ReflectionObjectDescriptor
Definition
Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll
Object descriptor based on reflection.
Inheritance
Object ⇦ ReflectionObjectDescriptor
Implements
IObjectDescriptor
Members
Properties
Name | Description |
---|---|
MemberNames | Enumerates the names of all members of the object type. |
SupportsChangeNotifications | Whether or not objects of this type can notify about data changes; that is, if the type implements INotifyPropertyChanged. |
TargetType | The type being described, which owns or inherits each of the available members. |
Methods
Name | Description |
---|---|
TryGetEvent(string, IEventDescriptor) | Attempts to retrieve a named event on the TargetType. |
TryGetMethod(string, IMethodDescriptor) | Attempts to retrieve a named method of the TargetType. |
TryGetProperty(string, IPropertyDescriptor) | Attempts to retrieve a named property of the TargetType. |
Details
Properties
MemberNames
Enumerates the names of all members of the object type.
Property Value
SupportsChangeNotifications
Whether or not objects of this type can notify about data changes; that is, if the type implements INotifyPropertyChanged.
Property Value
TargetType
The type being described, which owns or inherits each of the available members.
Property Value
Methods
TryGetEvent(string, IEventDescriptor)
Attempts to retrieve a named event on the TargetType.
Parameters
name
string
The event name.
event
IEventDescriptor
When this method returns, holds a reference to the IEventDescriptor whose Name is name
, or null
if no event was found with the given name.
Returns
true
if the named event was found, otherwise false
.
TryGetMethod(string, IMethodDescriptor)
Attempts to retrieve a named method of the TargetType.
public bool TryGetMethod(string name, out StardewUI.Framework.Descriptors.IMethodDescriptor method);
Parameters
name
string
The method name.
method
IMethodDescriptor
When this method returns, holds a reference to the IMethodDescriptor whose Name is name
, or null
if no method was found with the given name.
Returns
true
if the named method was found, otherwise false
.
Remarks
Overloaded methods are not supported. If different signatures are required, use optional parameters.
TryGetProperty(string, IPropertyDescriptor)
Attempts to retrieve a named property of the TargetType.
public bool TryGetProperty(string name, out StardewUI.Framework.Descriptors.IPropertyDescriptor property);
Parameters
name
string
The property name.
property
IPropertyDescriptor
When this method returns, holds a reference to the IPropertyDescriptor whose Name is name
, or null
if no property was found with the given name.
Returns
true
if the named property was found, otherwise false
.