OpenTAP 9.25
API Reference
Public Member Functions | List of all members
OpenTap.IStringConvertProvider Interface Reference

Plugin interface for string convert providers. More...

Inheritance diagram for OpenTap.IStringConvertProvider:
OpenTap.ITapPlugin

Public Member Functions

string GetString (object value, CultureInfo culture)
 Returns a string when the implementation supports converting the value. Otherwise, returns null. More...
 
object FromString (string stringData, ITypeData type, object contextObject, CultureInfo culture)
 Creates an object from stringdata. The returned object should be of type 'type'. Returns null if it cannot convert stringdata to type. More...
 

Detailed Description

Plugin interface for string convert providers.

FromString(GetString(value), value.GetType()) shall always return a non-null value, if GetString(value) returns a non-null value.

Member Function Documentation

◆ FromString()

object OpenTap.IStringConvertProvider.FromString ( string  stringData,
ITypeData  type,
object  contextObject,
CultureInfo  culture 
)

Creates an object from stringdata. The returned object should be of type 'type'. Returns null if it cannot convert stringdata to type.

Parameters
stringData
type
contextObjectThe object on which the value is set.
cultureThe culture used for the conversion. This value can will default to InvariantCulture if nothing else is selected.
Returns

◆ GetString()

string OpenTap.IStringConvertProvider.GetString ( object  value,
CultureInfo  culture 
)

Returns a string when the implementation supports converting the value. Otherwise, returns null.

Parameters
valueCannot be null.
cultureThe culture used for the conversion.
Returns

OpenTAP 9.25 API built Tue Aug 6 2024 07:49:24