OpenTAP 9.34
API Reference
OpenTap.StringConvertProvider Class Reference

Helper methods for converting to/from strings. More...

Static Public Member Functions

static string GetString (object value, CultureInfo culture=null)
 Turn value to a string if an IStringConvertProvider plugin supports the value. Returns null if the input value is null.
 
static bool TryGetString (object value, out string str, CultureInfo culture=null)
 Try get a string from an object value.
 
static object FromString (string stringdata, ITypeData type, object contextObject, CultureInfo culture=null)
 Turn stringdata back to an object of type 'type', if an IStringConvertProvider plugin supports the string/type.
 
static bool TryFromString (string stringdata, ITypeData type, object contextObject, out object result, CultureInfo culture=null)
 Turn stringdata back to an object of type 'type', if an IStringConvertProvider plugin supports the string/type. returns true if the parsing was successful.
 

Detailed Description

Helper methods for converting to/from strings.

Member Function Documentation

◆ FromString()

static object OpenTap.StringConvertProvider.FromString ( string stringdata,
ITypeData type,
object contextObject,
CultureInfo culture = null )
inlinestatic

Turn stringdata back to an object of type 'type', if an IStringConvertProvider plugin supports the string/type.

Parameters
stringdata
type
contextObject
cultureIf null, invariant culture is used.
Returns

◆ GetString()

static string OpenTap.StringConvertProvider.GetString ( object value,
CultureInfo culture = null )
inlinestatic

Turn value to a string if an IStringConvertProvider plugin supports the value. Returns null if the input value is null.

Parameters
valueThe value to be converted to a string.
cultureIf null, invariant culture is used.
Returns

◆ TryFromString()

static bool OpenTap.StringConvertProvider.TryFromString ( string stringdata,
ITypeData type,
object contextObject,
out object result,
CultureInfo culture = null )
inlinestatic

Turn stringdata back to an object of type 'type', if an IStringConvertProvider plugin supports the string/type. returns true if the parsing was successful.

Parameters
stringdata
type
contextObject
resultThe result of the operation.
culture
Returns

◆ TryGetString()

static bool OpenTap.StringConvertProvider.TryGetString ( object value,
out string str,
CultureInfo culture = null )
inlinestatic

Try get a string from an object value.

Parameters
value
str
culture
Returns

OpenTAP 9.34 API built Wed Jul 1 2026 09:21:15