F# Data


TextRuntime

Namespace: FSharp.Data.Runtime

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

Record Fields

Record FieldDescription
cultureInfoCache
Signature: Dictionary<string,CultureInfo>
Modifiers: mutable static

Static members

Static memberDescription
AsyncMap(valueAsync, mapping)
Signature: (valueAsync:Async<'T> * mapping:Func<'T,'R>) -> Async<'R>
Type parameters: 'T, 'R

Turn a sync operation into an async operation

ConvertBoolean(text)
Signature: (text:string option) -> bool option
ConvertBooleanBack(value, use0and1)
Signature: (value:bool option * use0and1:bool) -> string
ConvertDateTime(cultureStr, text)
Signature: (cultureStr:string * text:string option) -> DateTime option
ConvertDateTimeBack(cultureStr, value)
Signature: (cultureStr:string * value:DateTime option) -> string
ConvertDecimal(cultureStr, text)
Signature: (cultureStr:string * text:string option) -> decimal option
ConvertDecimalBack(cultureStr, value)
Signature: (cultureStr:string * value:decimal option) -> string
ConvertFloat(...)
Signature: (cultureStr:string * missingValuesStr:string * text:string option) -> float option
ConvertFloatBack(...)
Signature: (cultureStr:string * missingValuesStr:string * value:float option) -> string
ConvertGuid(text)
Signature: (text:string option) -> Guid option
ConvertGuidBack(value)
Signature: (value:Guid option) -> string
ConvertInteger(cultureStr, text)
Signature: (cultureStr:string * text:string option) -> int option
ConvertInteger64(cultureStr, text)
Signature: (cultureStr:string * text:string option) -> int64 option
ConvertInteger64Back(cultureStr, value)
Signature: (cultureStr:string * value:int64 option) -> string
ConvertIntegerBack(cultureStr, value)
Signature: (cultureStr:string * value:int option) -> string
ConvertString(text)
Signature: (text:string option) -> string option
ConvertStringBack(value)
Signature: (value:string option) -> string
GetCulture(cultureStr)
Signature: cultureStr:string -> CultureInfo

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

GetMissingValues(missingValuesStr)
Signature: missingValuesStr:string -> string []
GetNonOptionalValue(...)
Signature: (name:string * opt:'T option * originalValue:string option) -> 'T
Type parameters: '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

NullableToOption(nullable)
Signature: nullable:Nullable<'?7626> -> '?7626 option
Type parameters: '?7626

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

OptionToNullable(opt)
Signature: (opt:'?7624 option) -> Nullable<'?7624>
Type parameters: '?7624

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

Fork me on GitHub