[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Assembly: Db4objects.Db4o (in Db4objects.Db4o.dll)
registers a custom marshaller for this class.
Namespace: Db4objects.Db4o.Config
Assembly: Db4objects.Db4o (in Db4objects.Db4o.dll)
Syntax
Visual Basic (Declaration) |
---|
Sub MarshallWith ( _ marshaller As IObjectMarshaller _ ) |
C# |
---|
void MarshallWith ( IObjectMarshaller marshaller ) |
Visual C++ |
---|
void MarshallWith ( IObjectMarshaller^ marshaller ) |
Parameters
- marshaller
- Db4objects.Db4o.Config.IObjectMarshaller
to be used for this class
Remarks
registers a custom marshaller for this class.
Custom marshallers can be used for tuning the performance to store and read objects. Instead of letting db4o do all the marshalling by detecting the fields on a class and by using reflection, a custom ObjectMarshaller allows the application developer to write the logic how the fields of an object are converted to a byte[] and back.
Downside:
- Indexes and querying can not be used.
Upsides:
- Not all fields need to be stored.
- Reflection does not need to be called.
As an alternative to using a custom marshallers you may want to consider writing an ObjectTranslator or your own Reflector .
The use of an ObjectMarshaller is not compatible with the use of an ObjectTranslator .
Custom marshallers can be used for tuning the performance to store and read objects. Instead of letting db4o do all the marshalling by detecting the fields on a class and by using reflection, a custom ObjectMarshaller allows the application developer to write the logic how the fields of an object are converted to a byte[] and back.
Downside:
- Indexes and querying can not be used.
Upsides:
- Not all fields need to be stored.
- Reflection does not need to be called.
As an alternative to using a custom marshallers you may want to consider writing an ObjectTranslator or your own Reflector .
The use of an ObjectMarshaller is not compatible with the use of an ObjectTranslator .