Section navigation

Public classStatic LeanNumericEncoders

Namespace
Rowles.LeanCorpus.Mapping
Assembly
Rowles.LeanCorpus.dll

AOT-safe encoding and decoding helpers used by generated document mappers when projecting CLR temporal and decimal values to numeric or stored fields.

public static class LeanNumericEncoders
Inheritance
LeanNumericEncoders

Public method FromDayNumber(double)

Decodes a DateOnly from its day number.

Public method FromDecimalString(string)

Parses a decimal from an invariant-culture string.

Public method FromTimeOnlyTicks(double)

Decodes a TimeOnly from its tick count.

Public method FromUnixMilliseconds(double)

Decodes a DateTimeOffset from Unix milliseconds.

Public method FromUnixSeconds(double)

Decodes a DateTimeOffset from Unix seconds.

Public method FromUtcTicks(double)

Decodes a DateTimeOffset from UTC ticks.

Public method ToDayNumber(DateOnly)

Encodes a DateOnly as DayNumber.

Public method ToDecimalString(decimal)

Formats a decimal losslessly using the invariant culture.

Public method ToTimeOnlyTicks(TimeOnly)

Encodes a TimeOnly as Ticks.

Public method ToUnixMilliseconds(DateTimeOffset)

Encodes a DateTimeOffset as Unix milliseconds since the epoch.

Public method ToUnixSeconds(DateTimeOffset)

Encodes a DateTimeOffset as Unix seconds since the epoch.

Public method ToUtcTicks(DateTimeOffset)

Encodes a DateTimeOffset as UTC ticks.