Click or drag to resize

ValueWriterT Class

Provides access to IValueWriterT implementations for various basic framework types and types that specify the ValueWriterAttribute attribute.
Inheritance Hierarchy
SystemObject
  Ookii.Jumbo.IOValueWriterT

Namespace: Ookii.Jumbo.IO
Assembly: Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 0.3.0+dc1307f20e065bb638e0b73a34cd216f57e486f1
Syntax
public static class ValueWriter<T>

Type Parameters

T
The type of the object whose IWritable or IValueWriterT implementation to use.

The ValueWriterT type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberWriter Gets the writer for the type, or if it implements IWritable.
Top
Methods
 NameDescription
Public methodStatic memberReadValue Reads a value from the specified reader using the type's IWritable implementation or its IValueWriterT.
Public methodStatic memberWriteValue Writes the specified value using its IWritable implementation or its IValueWriterT.
Top
Remarks

If you attempt to access this class for a type T that does not implement IWritable and that does not have a implementation of IValueWriterT, an NotSupportedException is thrown by the static type initializer of the ValueWriterT class.

Built-in value writers are provided for the following types: SByte, Int16, Int32, Int64, Byte, UInt16, UInt32, UInt64, Decimal, Single, Double, String, DateTime, Boolean, ValueTupleT1, ValueTupleT1, T2, ValueTupleT1, T2, T3, ValueTupleT1, T2, T3, T4, ValueTupleT1, T2, T3, T4, T5, ValueTupleT1, T2, T3, T4, T5, T6, ValueTupleT1, T2, T3, T4, T5, T6, T7ValueTupleT1, T2, T3, T4, T5, T6, T7, TRest, TupleT1, TupleT1, T2, TupleT1, T2, T3, TupleT1, T2, T3, T4, TupleT1, T2, T3, T4, T5, TupleT1, T2, T3, T4, T5, T6, TupleT1, T2, T3, T4, T5, T6, T7 and TupleT1, T2, T3, T4, T5, T6, T7, TRest.

Although value writers support tuples, there may be negative performance implications from using the reference type tuples, as they are read-only and do not support record reuse. Using value tuples is recommended.

The KeyValuePairTKey, TValue structure is not supported by the value writer. Please use the PairTKey, TValue class instead, which provides additional functionality for key/value pairs required by Jumbo.

See Also