Header menu logo FSharp.Data

TextRuntime Type

Static helper methods called from the generated code for working with text

Record fields

Record Field Description

cultureInfoCache

Full Usage: cultureInfoCache

Field type: Dictionary<string, CultureInfo>
Modifiers: mutable static
Field type: Dictionary<string, CultureInfo>

Static members

Static member Description

TextRuntime.AsyncMap(valueAsync, mapping)

Full Usage: TextRuntime.AsyncMap(valueAsync, mapping)

Parameters:
    valueAsync : Async<'T>
    mapping : Func<'T, 'R>

Returns: Async<'R>

Turn a sync operation into an async operation

valueAsync : Async<'T>
mapping : Func<'T, 'R>
Returns: Async<'R>

TextRuntime.ConvertBoolean(text)

Full Usage: TextRuntime.ConvertBoolean(text)

Parameters:
    text : string option

Returns: bool option
text : string option
Returns: bool option

TextRuntime.ConvertBooleanBack(value, use0and1)

Full Usage: TextRuntime.ConvertBooleanBack(value, use0and1)

Parameters:
    value : bool option
    use0and1 : bool

Returns: string
value : bool option
use0and1 : bool
Returns: string

TextRuntime.ConvertDateTime(cultureStr, text)

Full Usage: TextRuntime.ConvertDateTime(cultureStr, text)

Parameters:
    cultureStr : string
    text : string option

Returns: DateTime option
cultureStr : string
text : string option
Returns: DateTime option

TextRuntime.ConvertDateTimeBack(cultureStr, value)

Full Usage: TextRuntime.ConvertDateTimeBack(cultureStr, value)

Parameters:
    cultureStr : string
    value : DateTime option

Returns: string
cultureStr : string
value : DateTime option
Returns: string

TextRuntime.ConvertDateTimeOffset(cultureStr, text)

Full Usage: TextRuntime.ConvertDateTimeOffset(cultureStr, text)

Parameters:
    cultureStr : string
    text : string option

Returns: DateTimeOffset option
cultureStr : string
text : string option
Returns: DateTimeOffset option

TextRuntime.ConvertDateTimeOffsetBack(cultureStr, value)

Full Usage: TextRuntime.ConvertDateTimeOffsetBack(cultureStr, value)

Parameters:
Returns: string
cultureStr : string
value : DateTimeOffset option
Returns: string

TextRuntime.ConvertDecimal(cultureStr, text)

Full Usage: TextRuntime.ConvertDecimal(cultureStr, text)

Parameters:
    cultureStr : string
    text : string option

Returns: decimal option
cultureStr : string
text : string option
Returns: decimal option

TextRuntime.ConvertDecimalBack(cultureStr, value)

Full Usage: TextRuntime.ConvertDecimalBack(cultureStr, value)

Parameters:
    cultureStr : string
    value : decimal option

Returns: string
cultureStr : string
value : decimal option
Returns: string

TextRuntime.ConvertFloat(cultureStr, missingValuesStr, text)

Full Usage: TextRuntime.ConvertFloat(cultureStr, missingValuesStr, text)

Parameters:
    cultureStr : string
    missingValuesStr : string
    text : string option

Returns: float option
cultureStr : string
missingValuesStr : string
text : string option
Returns: float option

TextRuntime.ConvertFloatBack(cultureStr, missingValuesStr, value)

Full Usage: TextRuntime.ConvertFloatBack(cultureStr, missingValuesStr, value)

Parameters:
    cultureStr : string
    missingValuesStr : string
    value : float option

Returns: string
cultureStr : string
missingValuesStr : string
value : float option
Returns: string

TextRuntime.ConvertGuid(text)

Full Usage: TextRuntime.ConvertGuid(text)

Parameters:
    text : string option

Returns: Guid option
text : string option
Returns: Guid option

TextRuntime.ConvertGuidBack(value)

Full Usage: TextRuntime.ConvertGuidBack(value)

Parameters:
    value : Guid option

Returns: string
value : Guid option
Returns: string

TextRuntime.ConvertInteger(cultureStr, text)

Full Usage: TextRuntime.ConvertInteger(cultureStr, text)

Parameters:
    cultureStr : string
    text : string option

Returns: int option
cultureStr : string
text : string option
Returns: int option

TextRuntime.ConvertInteger64(cultureStr, text)

Full Usage: TextRuntime.ConvertInteger64(cultureStr, text)

Parameters:
    cultureStr : string
    text : string option

Returns: int64 option
cultureStr : string
text : string option
Returns: int64 option

TextRuntime.ConvertInteger64Back(cultureStr, value)

Full Usage: TextRuntime.ConvertInteger64Back(cultureStr, value)

Parameters:
    cultureStr : string
    value : int64 option

Returns: string
cultureStr : string
value : int64 option
Returns: string

TextRuntime.ConvertIntegerBack(cultureStr, value)

Full Usage: TextRuntime.ConvertIntegerBack(cultureStr, value)

Parameters:
    cultureStr : string
    value : int option

Returns: string
cultureStr : string
value : int option
Returns: string

TextRuntime.ConvertString(text)

Full Usage: TextRuntime.ConvertString(text)

Parameters:
    text : string option

Returns: string option
text : string option
Returns: string option

TextRuntime.ConvertStringBack(value)

Full Usage: TextRuntime.ConvertStringBack(value)

Parameters:
    value : string option

Returns: string
value : string option
Returns: string

TextRuntime.ConvertTimeSpan(cultureStr, text)

Full Usage: TextRuntime.ConvertTimeSpan(cultureStr, text)

Parameters:
    cultureStr : string
    text : string option

Returns: TimeSpan option
cultureStr : string
text : string option
Returns: TimeSpan option

TextRuntime.ConvertTimeSpanBack(cultureStr, value)

Full Usage: TextRuntime.ConvertTimeSpanBack(cultureStr, value)

Parameters:
    cultureStr : string
    value : TimeSpan option

Returns: string
cultureStr : string
value : TimeSpan option
Returns: string

TextRuntime.GetCulture(cultureStr)

Full Usage: TextRuntime.GetCulture(cultureStr)

Parameters:
    cultureStr : string

Returns: CultureInfo

Returns CultureInfo matching the specified culture string (or InvariantCulture if the argument is null or empty)

cultureStr : string
Returns: CultureInfo

TextRuntime.GetMissingValues(missingValuesStr)

Full Usage: TextRuntime.GetMissingValues(missingValuesStr)

Parameters:
    missingValuesStr : string

Returns: string[]
missingValuesStr : string
Returns: string[]

TextRuntime.GetNonOptionalValue(name, opt, originalValue)

Full Usage: TextRuntime.GetNonOptionalValue(name, opt, originalValue)

Parameters:
    name : string
    opt : 'T option
    originalValue : string option

Returns: 'T

Operation that extracts the value from an option and reports a meaningful error message when the value is not there For missing strings we return "", and for missing doubles we return NaN For other types an error is thrown

name : string
opt : 'T option
originalValue : string option
Returns: 'T

TextRuntime.NullableToOption(nullable)

Full Usage: TextRuntime.NullableToOption(nullable)

Parameters:
Returns: 'a option

Turn a .NET type Nullable<'T> to an F# option type Option<'T>

nullable : Nullable<'a>
Returns: 'a option

TextRuntime.OptionToNullable(opt)

Full Usage: TextRuntime.OptionToNullable(opt)

Parameters:
    opt : 'a option

Returns: Nullable<'a>

Turn an F# option type Option<'T> containing a primitive value type into a .NET type Nullable<'T>

opt : 'a option
Returns: Nullable<'a>

Type something to start searching.