Summary
Provides a way to register event handlers for specific
EventRegistry methods represent events available for registering callbacks. EventRegistry instance can be obtained from
Db4objects.Db4o.IObjectContainer
events.EventRegistry methods represent events available for registering callbacks. EventRegistry instance can be obtained from
Db4objects.Db4o.Events.EventRegistryFactory
.
EventRegistry registry = EventRegistryFactory.ForObjectContainer(container);
A new callback can be registered for an event with the following code:
private static void OnCreated(object sender, ObjectInfoEventArgs args)
{
Object obj = args.Object;
if (obj is Pilot)
{
Console.WriteLine(obj.ToString());
}
}
registry.Created+=OnCreated;
- Assembly
- Db4objects
.Db4o-2010 .dll - Namespace
- Db4objects
.Db4o .Events - Implementing Types
graph BT
Type["IEventRegistry"]
class Type type-node
Implementing0["EventRegistryImpl"]-.->Type
click Implementing0 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal.Events/EventRegistryImpl"
Syntax
public interface IEventRegistry
Events
Name | Type | Summary |
---|---|---|
Activated | EventHandler |
This event is fired after an object is activated.
|
Activating | EventHandler |
This event is fired before an object is activated.
|
ClassRegistered | EventHandler |
This event is fired when a new class is registered with metadata.
|
Closing | EventHandler |
This event is fired when the
Db4objects.Db4o.IObjectContainer.Close
is
called.
|
Committed | EventHandler |
This event is fired after a transaction has been committed.
|
Committing | EventHandler |
This event is fired just before a transaction is committed.
|
Created | EventHandler |
This event is fired after an object is created (saved for the first time).
|
Creating | EventHandler |
This event is fired before an object is saved for the first time.
|
Deactivated | EventHandler |
This event is fired after an object is deactivated.
|
Deactivating | EventHandler |
This event is fired before an object is deactivated.
|
Deleted | EventHandler |
This event is fired after an object is deleted.
|
Deleting | EventHandler |
This event is fired before an object is deleted.
|
Instantiated | EventHandler |
This event is fired when a persistent object is instantiated.
|
Opened | EventHandler |
This event is fired when the
Db4objects.Db4o.IObjectContainer
has
finished its startup procedure.
|
QueryFinished | EventHandler |
This event is fired upon a query end and can be used to gather
query statistics.
|
QueryStarted | EventHandler |
This event is fired upon a query start and can be used to gather
query statistics.
|
Updated | EventHandler |
This event is fired after an object is updated.
|
Updating | EventHandler |
This event is fired before an object is updated.
|
See Also
- Db4objects.Db4o.Events.EventRegistryFactory