Class ReflectionViewDescriptor
Definition
Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll
View descriptor based on reflection.
public class ReflectionViewDescriptor :
StardewUI.Framework.Descriptors.IViewDescriptor,
StardewUI.Framework.Descriptors.IObjectDescriptor
Inheritance
Object ⇦ ReflectionViewDescriptor
Implements
IViewDescriptor, 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 |
---|---|
TryGetChildrenProperty(string, IPropertyDescriptor) | Attempts to retrieve the property of the TargetType that holds the view's children/content. |
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
TryGetChildrenProperty(string, IPropertyDescriptor)
Attempts to retrieve the property of the TargetType that holds the view's children/content.
public bool TryGetChildrenProperty(string outletName, out StardewUI.Framework.Descriptors.IPropertyDescriptor property);
Parameters
outletName
string
The name of the specific outlet, if targeting a non-default outlet on a view with multiple outlets. Corresponds to Name.
property
IPropertyDescriptor
When this method returns, holds a reference to the IPropertyDescriptor that holds the view's children/content, or null
if no such property is available.
Returns
true
if a children/content property was found, otherwise false
.
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
.