namespace Firebase.Database.Streaming { /// /// Firebase event which hold and the object affected by the event. /// /// Type of object affected by the event. public class FirebaseEvent : FirebaseObject { /// /// Initializes a new instance of the class. /// /// The key of the object. /// The object. /// The event type. public FirebaseEvent(string key, T obj, FirebaseEventType eventType, FirebaseEventSource eventSource) : base(key, obj) { EventType = eventType; EventSource = eventSource; } /// /// Gets the source of the event. /// public FirebaseEventSource EventSource { get; } /// /// Gets the event type. /// public FirebaseEventType EventType { get; } public static FirebaseEvent Empty(FirebaseEventSource source) { return new FirebaseEvent(string.Empty, default(T), FirebaseEventType.InsertOrUpdate, source); } } }