Class UnityReflectionCallTaskDefinition
Unity ScriptableObject-based definition for reflection call tasks.
Provides a Unity-specific implementation for configuring tasks that invoke methods
via reflection, supporting both static and instance method calls with parameter passing
and service resolution capabilities.
Inherited Members
Namespace: Serenity.Global.Infrastructure.Settings
Assembly: Serenity.UnityGlobal.Infrastructure.dll
Syntax
public class UnityReflectionCallTaskDefinition : UnityTaskDefinition, IReflectionCallTaskDefinition, ITaskDefinition, IFoundationSettings
Constructors
UnityReflectionCallTaskDefinition()
Declaration
public UnityReflectionCallTaskDefinition()
Properties
IsStatic
Gets or sets whether the target method is static.
Declaration
public bool IsStatic { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | True if the method is static, false if it requires an instance. |
MethodName
Gets or sets the method name to invoke via reflection.
Declaration
public string MethodName { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The name of the method. |
MethodParamTypes
Gets or sets the list of method parameter type names for overload resolution.
Declaration
public List<string> MethodParamTypes { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | List of parameter type names. |
ResolveFromServices
Declaration
public bool ResolveFromServices { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ScriptAsset
Gets or sets the optional script asset reference for editor convenience.
Declaration
public Object ScriptAsset { get; set; }
Property Value
| Type | Description |
|---|---|
| Object | The Unity Object representing the script asset. |
StringArgs
Gets or sets the string arguments to pass to the method.
Declaration
public List<string> StringArgs { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | List of string arguments. |
TypeName
Gets or sets the type name containing the method to invoke.
Declaration
public string TypeName { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The fully qualified type name. |
Methods
Build(TaskBuildContext)
Builds a UnityReflectionCallTask instance from this definition. Creates a task that will invoke the specified method via reflection with configured parameters, using Unity-specific instance activation and main-thread dispatching.
Declaration
public override ITask Build(TaskBuildContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| TaskBuildContext | context | Context containing services and build information |
Returns
| Type | Description |
|---|---|
| ITask | A configured UnityReflectionCallTask instance |