Summary
interface to allow instantiating objects by calling specific constructors.
- Assembly
- Db4objects
.Db4o-2010 .dll - Namespace
- Db4objects
.Db4o .Config - Interfaces
- Implementing Types
graph BT
Type-.->Interface0["IObjectTranslator"]
click Interface0 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Config/IObjectTranslator"
Type["IObjectConstructor"]
class Type type-node
Implementing0["TSerializable"]-.->Type
click Implementing0 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Config/TSerializable"
Implementing1["TTransient"]-.->Type
click Implementing1 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Config/TTransient"
Implementing2["TCultureInfo"]-.->Type
click Implementing2 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Config/TCultureInfo"
Implementing3["TType"]-.->Type
click Implementing3 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Config/TType"
Syntax
public interface IObjectConstructor : IObjectTranslator
Remarks
interface to allow instantiating objects by calling specific constructors.
By writing classes that implement this interface, it is possible to define which constructor is to be used during the instantiation of a stored object.
Before starting a db4o session, translator classes that implement the ObjectConstructor or
Example:
By writing classes that implement this interface, it is possible to define which constructor is to be used during the instantiation of a stored object.
Before starting a db4o session, translator classes that implement the ObjectConstructor or
Db4objects.Db4o.Config.IObjectTranslator
need to be registered.Example:
IConfiguration config = Db4oFactory.Configure();
IObjectClass oc = config.ObjectClass("Namespace.ClassName");
oc.Translate(new FooTranslator());
Methods
Name | Value | Summary |
---|---|---|
OnInstantiate |
Object |
db4o calls this method when a stored object needs to be instantiated.
|