|
Enhanced C#
Loyc library documentation
|
Assigns a "type tag" to a synchronizer, which identifies the type of object it reads/writes within a data stream, enabling dynamic typing (polymorphic serialization and deserialization). More...
Assigns a "type tag" to a synchronizer, which identifies the type of object it reads/writes within a data stream, enabling dynamic typing (polymorphic serialization and deserialization).
Place this attribute on a synchronizer method (preferred), or on a synchronizer struct/class that implements ISyncObject{SM, T}. Do not put it on the data types being synchronized, as SyncLib does not expect business objects to be concerned with serialization.
This attribute is merely data; it is read and interpreted by TypeTagRegistry, whose virtual AttributeTagOf methods define the convention (and can be overridden to change it). In brief:
Add<T> overloads takes precedence over this attribute. Synchronizers without a tag behave as before: no tag is read or written unless the synchronizer calls ISyncManager.SyncTypeTag manually (a low-level technique that is incompatible with dynamic typing, because a reader must know the tag before it can choose which synchronizer to invoke).
Properties | |
| string | Tag [get] |
Public Member Functions | |
| TypeTagAttribute (string tag) | |
1.8.7