SerializationWriterWriteTokenizedObject Method (Object, Boolean) |
Writes a token (an Int32 taking 1 to 4 bytes) into the stream that represents the object instance.
The same token will always be used for the same object instance.
When recreateFromType is set to true, the object's Type will be stored and the object recreated using
Activator.GetInstance with a parameterless contructor. This is useful for stateless, factory-type classes.
When recreateFromType is set to false, the object will be serialized once and recreated at deserialization time.
Calls to SerializationReader.ReadTokenizedObject() will retrieve the same object instance.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.2.0.0 (5.2.17.0403)
Syntax public void WriteTokenizedObject(
Object value,
bool recreateFromType
)
Public Sub WriteTokenizedObject (
value As Object,
recreateFromType As Boolean
)
Parameters
- value
- Type: SystemObject
The object to tokenize. Must not be null and must not be a string. - recreateFromType
- Type: SystemBoolean
true if the object can be recreated using a parameterless constructor;
false if the object should be serialized as-is
See Also