IEventRegistry Interface

Summary

Provides a way to register event handlers for specific 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<ObjectInfoEventArgs>
This event is fired after an object is activated.
Activating EventHandler<CancellableObjectEventArgs>
This event is fired before an object is activated.
ClassRegistered EventHandler<ClassEventArgs>
This event is fired when a new class is registered with metadata.
Closing EventHandler<ObjectContainerEventArgs>
This event is fired when the Db4objects.Db4o.IObjectContainer.Close is called.
Committed EventHandler<CommitEventArgs>
This event is fired after a transaction has been committed.
Committing EventHandler<CommitEventArgs>
This event is fired just before a transaction is committed.
Created EventHandler<ObjectInfoEventArgs>
This event is fired after an object is created (saved for the first time).
Creating EventHandler<CancellableObjectEventArgs>
This event is fired before an object is saved for the first time.
Deactivated EventHandler<ObjectInfoEventArgs>
This event is fired after an object is deactivated.
Deactivating EventHandler<CancellableObjectEventArgs>
This event is fired before an object is deactivated.
Deleted EventHandler<ObjectInfoEventArgs>
This event is fired after an object is deleted.
Deleting EventHandler<CancellableObjectEventArgs>
This event is fired before an object is deleted.
Instantiated EventHandler<ObjectInfoEventArgs>
This event is fired when a persistent object is instantiated.
Opened EventHandler<ObjectContainerEventArgs>
This event is fired when the Db4objects.Db4o.IObjectContainer has finished its startup procedure.
QueryFinished EventHandler<QueryEventArgs>
This event is fired upon a query end and can be used to gather query statistics.
QueryStarted EventHandler<QueryEventArgs>
This event is fired upon a query start and can be used to gather query statistics.
Updated EventHandler<ObjectInfoEventArgs>
This event is fired after an object is updated.
Updating EventHandler<CancellableObjectEventArgs>
This event is fired before an object is updated.

See Also

  • Db4objects.Db4o.Events.EventRegistryFactory