AddType Method
AddType<T>()
Adds a type.
Declaration
public void AddType<T>()
Type Parameters
T | The type to add. |
Remarks
Use this method to declare that a type, which is not implicitly declared to compact serialization via any of the other available methods (such as registering a serializer for that type), should nevertheless be compact-serialized, even though another serialization method may also apply.
All object types are implicitly compact-serialized, but only if not other serialization method applies. An IPortable object would be portable-serialized by default. Use this method to bypass serialization methods detection and force compact serialization.
AddType(Type)
Declaration
public void AddType(Type type)
Parameters
Type | type |
Remarks
Use this method to declare that a type, which is not implicitly declared to compact serialization via any of the other available methods (such as registering a serializer for that type), should nevertheless be compact-serialized, even though another serialization method may also apply.
All object types are implicitly compact-serialized, but only if not other serialization method applies. An IPortable object would be portable-serialized by default. Use this method to bypass serialization methods detection and force compact serialization.