Docs · API reference · Verso.Parameters

ParameterValueParser Class#

Parses string values into typed CLR objects based on parameter type identifiers. Shared between the engine (interaction handler) and the CLI (ParameterTypeParser).

public static class ParameterValueParser

Inheritance System.Object → ParameterValueParser

Properties#

SupportedTypes Property#

Returns the set of supported type identifiers.

public static System.Collections.Generic.IReadOnlyList<string> SupportedTypes { get; }

Property Value#

System.Collections.Generic.IReadOnlyList<System.String>

Methods#

TryParse(string, string, object, string) Method#

Attempts to parse a string value into a CLR object according to the declared parameter type.

public static bool TryParse(string typeId, string value, out object? result, out string? error);

Parameters#

typeId System.String

The type identifier: string, int, float, bool, date, or datetime.

value System.String

The string value to parse.

result System.Object

The parsed CLR object on success.

error System.String

A descriptive error message on failure.

Returns#

System.Boolean
true if parsing succeeded; otherwise false.