18 using System.Collections.Generic;
20 namespace Deveel.Data.Diagnostics {
26 : this(DateTimeOffset.UtcNow) {
29 protected Event(DateTimeOffset timeStamp) {
30 TimeStamp = timeStamp;
34 var dictionary =
new Dictionary<string, object>();
35 GetEventData(dictionary);
39 protected virtual void GetEventData(Dictionary<string, object> data) {
47 return OnSourceGet(source);
49 set { source = OnSourceSet(value); }
52 public DateTimeOffset TimeStamp {
get;
private set; }
65 metadata = GenerateEventData();
virtual void GetEventData(Dictionary< string, object > data)
virtual IEventSource OnSourceSet(IEventSource eventSource)
This is an event occurred during the lifetime of a database.
IDictionary< string, object > metadata
Event(DateTimeOffset timeStamp)
IDictionary< string, object > EventData
Gets additional event data that come with the event.
IDictionary< string, object > GenerateEventData()
virtual IEventSource OnSourceGet(IEventSource eventSource)
Represents the origin of system events, providing a mechanism to fill the metadata before dispatching...