OrigoDb can be extended with custom behavior by choosing between existing or writing your own implementations of one or more of the following interfaces:
ILogFactory- logging module, see Logging
ISynchronizer- Handles reader/writer synchronization, used by the Kernel.
ICommandStore- custom storage provider for commands.
ISnapshotStore- custom storage provider for snapshots.
IFormatter- Xml, Json, BinaryFormatter (default), ProtoBuf…
When the engine requests an instance of
ICommandStore, the injected custom constructor function is invoked, overriding the default
FileCommandStore implementation. Similar injection methods for the other interfaces are available.
Formatters are used to serialize snapshots, commands, queries, results. Different formatters can be used for the different usages. For reference, here is the FormatterUsage enum and an example showing how to use it.
The default is FormatterUsage.Default meaning the injected constructor will applied to all usages that haven’t been explicitly set.