FdbValueExtensions
Namespace: FoundationDB.Client · class
Methods
Memoize
static FdbRawValue Memoize<TValue>(TValue value)
Creates a pre-encoded version of a value that can be reused multiple times
value— value to pre-encoded
Returns: Value with a cached version of the encoded original
This value can be used multiple times without re-encoding the original
ToSlice
static Slice ToSlice<TValue>(TValue value)
Encodes this value into Slice
value— Value to encode
Returns: Slice that contains the binary representation of this value
static SliceOwner ToSlice<TValue>(TValue value, ArrayPool<byte> pool)
Encodes this value into Slice, using backing buffer rented from a pool
value— Value to encodepool— Pool used to rent the buffer (Sharedisnull)
Returns: SliceOwner that contains the binary representation of this value