Click or drag to resize

WritableUtilityCreateSerializerT Method

Uses reflection to creates a function that serializes an object to a BinaryWriter; this function can be used in a Write(BinaryWriter) method.

Namespace:  Ookii.Jumbo.IO
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public static Action<T, BinaryWriter> CreateSerializer<T>()

Type Parameters

T
The type of the object to serialize.

Return Value

Type: ActionT, BinaryWriter
A ActionT1, T2 delegate to a method that serializes the object.
Remarks

The serializer created by this method will serialize only the public properties of the type which have a public get and set method. If you need to serialize additional state, you should do that manually.

The serializer supports properties that have a type supported by one of the overloads of the Write(String) method, as well those who implement IWritable themselves. The serializer supports values by writing a Boolean before each property that has a reference type that indicates whether it's or not.

See Also