mySobek Home   |   Help
Skip Navigation Links.
Expand <a href='http://sobekrepository.org/sobekcm' title='Sobek home page'>Project Home</a>Project Home
Expand <a href='http://sobekrepository.org/help' title='Online user help'>User Help</a>User Help
Expand <a href='http://sobekrepository.org/sobekcm/technical' title='Sobek home page'>Technical Help</a>Technical Help
Expand <a href='http://sobekrepository.org/software' title='Center for downloading all SobekCM-related software'>Download Center</a>Download Center
Training Videos
Collapse <a href='http://sobekrepository.org/codehelp' title='Details on each of the different classes, interfaces, properties, etc..'>Code Details</a>Code Details
Expand <a href='http://sobekrepository.org/codehelp/engineagnosticlayerdbaccess' title='EngineAgnosticLayerDbAccess'>EngineAgnosticLayerDbAccess Namespace</a>EngineAgnosticLayerDbAccess Namespace
Expand <a href='http://sobekrepository.org/codehelp/builder_library' title='SobekCM.Builder_Library'>Builder_Library Namespace</a>Builder_Library Namespace
Collapse <a href='http://sobekrepository.org/codehelp/core' title='SobekCM.Core'>Core Namespace</a>Core Namespace
Expand <a href='http://sobekrepository.org/codehelp/engine_library' title='SobekCM.Engine_Library'>Engine_Library Namespace</a>Engine_Library Namespace
Expand <a href='http://sobekrepository.org/codehelp/library' title='SobekCM.Library'>Library Namespace</a>Library Namespace
Expand <a href='http://sobekrepository.org/codehelp/resource_object' title='SobekCM.Resource_Object'>Resource_Object Namespace</a>Resource_Object Namespace
Expand <a href='http://sobekrepository.org/codehelp/tools' title='SobekCM.Tools'>Tools Namespace</a>Tools Namespace
MISSING BANNER

SerializationWriter.WriteTokenizedObject 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: SobekCM.Core.MemoryMgmt
Assembly: SobekCM_Core (in SobekCM_Core.dll) Version: 4.10.0.0 (4.10.0.0)

Syntax

C#
public void WriteTokenizedObject(
	Object value,
	bool recreateFromType
)

Parameters

value
Type: System..::..Object
The object to tokenize. Must not be null and must not be a string.
recreateFromType
Type: System..::..Boolean
true if the object can be recreated using a parameterless constructor; false if the object should be serialized as-is

See Also



Version 4.10.0 ( last generated Monday, March 7, 2016 )