Skip to content

Class DescriptorFactory

Definition

Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll

Factory for obtaining descriptors, encapsulating both dynamic (reflection) and static (precompiled) descriptors.

public static class DescriptorFactory

Inheritance
Object ⇦ DescriptorFactory

Members

Methods

Name Description
GetObjectDescriptor(Type, Boolean) Gets a descriptor for an arbitrary object type; typically used for binding targets.
GetViewDescriptor(Type) Gets a descriptor for a type that is assumed to be an IView implementation.

Details

Methods

GetObjectDescriptor(Type, bool)

Gets a descriptor for an arbitrary object type; typically used for binding targets.

public static StardewUI.Framework.Descriptors.IObjectDescriptor GetObjectDescriptor(System.Type type, bool lazy);
Parameters

type   Type
The object type.

lazy   Boolean
Whether to create the descriptor with lazily-initialized members. Lazy descriptors are faster to create, but may have slower initial access times.

Returns

IObjectDescriptor


GetViewDescriptor(Type)

Gets a descriptor for a type that is assumed to be an IView implementation.

public static StardewUI.Framework.Descriptors.IViewDescriptor GetViewDescriptor(System.Type type);
Parameters

type   Type
The object type.

Returns

IViewDescriptor

Remarks

View descriptors include additional information about view-specific types, such as outlets.