Interface IObjectDescriptor
Definition
Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll
Describes a type of object that participates in view binding, either as the target or the source.
Remarks
The binding target is independent of the actual object instance; it provides methods and data to support interacting with any object of the given TargetType.
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 |
|---|---|
| GetEvent(string) | Retrieves a named event on the TargetType. |
| GetMethod(string) | Retrieves a named method of the TargetType. |
| GetProperty(string) | Retrieves a named property of the TargetType. |
| 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
GetEvent(string)
Retrieves a named event on the TargetType.
Parameters
name string
The event name.
Returns
The IEventDescriptor whose Name is name.
GetMethod(string)
Retrieves a named method of the TargetType.
Parameters
name string
The method name.
Returns
The IMethodDescriptor whose Name is name.
Remarks
Overloaded methods are not supported. If different signatures are required, use optional parameters.
GetProperty(string)
Retrieves a named property of the TargetType.
Parameters
name string
The property name.
Returns
The IPropertyDescriptor whose Name is name.
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.
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.
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.