From e6181c24124d97f2fbc932b8a68311e625463156 Mon Sep 17 00:00:00 2001 From: uzvkl Date: Tue, 11 Jun 2019 23:05:52 +0200 Subject: Move dsa related stuff to subfolder --- dsa/FireBase/Streaming/FirebaseEvent.cs | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 dsa/FireBase/Streaming/FirebaseEvent.cs (limited to 'dsa/FireBase/Streaming/FirebaseEvent.cs') diff --git a/dsa/FireBase/Streaming/FirebaseEvent.cs b/dsa/FireBase/Streaming/FirebaseEvent.cs new file mode 100644 index 0000000..1761a72 --- /dev/null +++ b/dsa/FireBase/Streaming/FirebaseEvent.cs @@ -0,0 +1,37 @@ +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); + } + } +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf