Class ReflectionCallTargetMethodResolver
Resolves the public method a UnityReflectionCallTaskDefinition targets by type name, method
name and staticness, and formats its parameters into the assembly-qualified-name list the definition
stores in MethodParamTypes — the same format
Serenity.Tasking.Application.Tasks.ReflectionCallTask.SelectMethod reads back at runtime.
The single place that answers "type + method name → the method and its stored signature", used both
when an editor tool creates a task asset (ReflectionCallTaskAssetBuilder,
CutsceneCreator.CreateInitPipelineTask) and when
UnityReflectionCallTaskDefinitionEditor re-resolves a stored one, so a freshly authored task
never disagrees with what re-opening its inspector would resolve.
Overload rule: when methodName is overloaded on the target type, the
overload with the fewest parameters wins. This mirrors
UnityReflectionCallTaskDefinitionEditor's own method list, which is sorted by name then by
parameter count and picks the first match by name when no exact signature is already stored — this
type does not invent a different rule.
Inherited Members
Namespace: Serenity.Global.Infrastructure.Utils
Assembly: Serenity.UnityGlobal.Infrastructure.dll
Syntax
public static class ReflectionCallTargetMethodResolver
Methods
ResolveMethod(string, string, bool)
Resolves targetTypeAssemblyQualifiedName and finds the public method named
methodName on it, declared directly on that type (not inherited) and matching
isStatic.
Declaration
public static MethodInfo ResolveMethod(string targetTypeAssemblyQualifiedName, string methodName, bool isStatic)
Parameters
| Type | Name | Description |
|---|---|---|
| string | targetTypeAssemblyQualifiedName | The target type's name, as stored in
|
| string | methodName | The method's name. |
| bool | isStatic | Whether the method is static rather than an instance method. |
Returns
| Type | Description |
|---|---|
| MethodInfo | The resolved method, or null when the type or method cannot be resolved. |
ResolveMethod(Type, string, bool)
Finds the public method named methodName on targetType,
declared directly on it (not inherited) and matching isStatic. See the type's
remarks for the rule applied when the name is overloaded.
Declaration
public static MethodInfo ResolveMethod(Type targetType, string methodName, bool isStatic)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | targetType | The type declaring the method, or null. |
| string | methodName | The method's name. |
| bool | isStatic | Whether the method is static rather than an instance method. |
Returns
| Type | Description |
|---|---|
| MethodInfo | The resolved method, or null when |
ResolveParamTypeAssemblyQualifiedNames(MethodInfo)
Formats method's parameter types into the assembly-qualified-name list stored
on a UnityReflectionCallTaskDefinition, in declaration order.
Declaration
public static List<string> ResolveParamTypeAssemblyQualifiedNames(MethodInfo method)
Parameters
| Type | Name | Description |
|---|---|---|
| MethodInfo | method | The resolved method, or null. |
Returns
| Type | Description |
|---|---|
| List<string> | The parameter type names in the stored string format; empty when
|
ResolveParamTypeAssemblyQualifiedNames(string, string, bool)
Resolves the method the same way ResolveMethod(string, string, bool) does, and formats its parameter types into the stored string list — empty when the method is parameterless or cannot be resolved.
Declaration
public static List<string> ResolveParamTypeAssemblyQualifiedNames(string targetTypeAssemblyQualifiedName, string methodName, bool isStatic)
Parameters
| Type | Name | Description |
|---|---|---|
| string | targetTypeAssemblyQualifiedName | The target type's name, as stored in
|
| string | methodName | The method's name. |
| bool | isStatic | Whether the method is static rather than an instance method. |
Returns
| Type | Description |
|---|---|
| List<string> | The parameter type names in the stored string format. |