OpenTAP 9.25
API Reference
Static Public Member Functions | List of all members
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. More...
 
static bool TryGetString (object value, out string str, CultureInfo culture=null)
 Try get a string from an object value. More...
 
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. More...
 
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. More...
 

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.25 API built Tue Aug 6 2024 07:49:24