Class DefaultStringArgumentResolver
Basic string conversion to type.
If the parameter is an interface/class implemented by an asset,
it attempts to resolve it with the IAssetLocator registered in services (Addressables, Resources, bundles, etc).
Implements
Inherited Members
Namespace: Serenity.Tasking.Application.Utils
Assembly: Serenity.Global.Application.dll
Syntax
public class DefaultStringArgumentResolver : IStringArgumentResolver
Constructors
DefaultStringArgumentResolver()
Declaration
public DefaultStringArgumentResolver()
Methods
TryResolve(string, Type, ITaskServices, out object)
Attempts to resolve a string argument to the specified target type.
Declaration
public bool TryResolve(string raw, Type targetType, ITaskServices services, out object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | raw | The raw string argument to resolve. |
| Type | targetType | The target type to convert the string to. |
| ITaskServices | services | The task services providing context for resolution (e.g., IAssetLocator). |
| object | value | The resolved value if successful; otherwise, null. |
Returns
| Type | Description |
|---|---|
| bool | True if the resolution was successful; otherwise, false. |