From f89f308c525e9deebc6d2cf6416e27dfe1a299dc Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 19 May 2019 16:03:38 +0200 Subject: Cleanup DiscoBot Project --- FireBase/Offline/OfflineEntry.cs | 60 ++++++++++++---------------------------- 1 file changed, 18 insertions(+), 42 deletions(-) (limited to 'FireBase/Offline/OfflineEntry.cs') diff --git a/FireBase/Offline/OfflineEntry.cs b/FireBase/Offline/OfflineEntry.cs index 3b862cb..dfd5910 100644 --- a/FireBase/Offline/OfflineEntry.cs +++ b/FireBase/Offline/OfflineEntry.cs @@ -1,7 +1,6 @@ namespace Firebase.Database.Offline { using System; - using Newtonsoft.Json; /// @@ -18,16 +17,17 @@ /// The object. /// The priority. Objects with higher priority will be synced first. Higher number indicates higher priority. /// The sync options. - public OfflineEntry(string key, object obj, string data, int priority, SyncOptions syncOptions, bool isPartial = false) + public OfflineEntry(string key, object obj, string data, int priority, SyncOptions syncOptions, + bool isPartial = false) { - this.Key = key; - this.Priority = priority; - this.Data = data; - this.Timestamp = DateTime.UtcNow; - this.SyncOptions = syncOptions; - this.IsPartial = isPartial; + Key = key; + Priority = priority; + Data = data; + Timestamp = DateTime.UtcNow; + SyncOptions = syncOptions; + IsPartial = isPartial; - this.dataInstance = obj; + dataInstance = obj; } /// @@ -45,63 +45,39 @@ /// /// Initializes a new instance of the class. /// - public OfflineEntry() + public OfflineEntry() { } /// /// Gets or sets the key of this entry. /// - public string Key - { - get; - set; - } + public string Key { get; set; } /// /// Gets or sets the priority. Objects with higher priority will be synced first. Higher number indicates higher priority. /// - public int Priority - { - get; - set; - } + public int Priority { get; set; } /// /// Gets or sets the timestamp when this entry was last touched. /// - public DateTime Timestamp - { - get; - set; - } + public DateTime Timestamp { get; set; } /// /// Gets or sets the which define what sync state this entry is in. /// - public SyncOptions SyncOptions - { - get; - set; - } + public SyncOptions SyncOptions { get; set; } /// /// Gets or sets serialized JSON data. /// - public string Data - { - get; - set; - } + public string Data { get; set; } /// /// Specifies whether this is only a partial object. /// - public bool IsPartial - { - get; - set; - } + public bool IsPartial { get; set; } /// /// Deserializes into . The result is cached. @@ -110,7 +86,7 @@ /// Instance of . public T Deserialize() { - return (T)(this.dataInstance ?? (this.dataInstance = JsonConvert.DeserializeObject(this.Data))); + return (T) (dataInstance ?? (dataInstance = JsonConvert.DeserializeObject(Data))); } } -} +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf