diff options
author | natrixaeria <janng@gmx.de> | 2019-05-19 17:40:59 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-19 17:40:59 +0200 |
commit | 1509b5ef3d7e9e71d9294e234ec0e39f2d831998 (patch) | |
tree | 78300ffff230958101b422a4e6026925b287822f /FireBase/FirebaseOptions.cs | |
parent | c3bb858bb54dc8c64bbd48054c2c58dc0073f09c (diff) | |
parent | c4d046858e0822b7c2c540ac2368b2c0e88e7a26 (diff) |
Merge branch 'scribble' of https://github.com/TrueDoctor/DiscoBot into scribble
Diffstat (limited to 'FireBase/FirebaseOptions.cs')
-rw-r--r-- | FireBase/FirebaseOptions.cs | 78 |
1 files changed, 27 insertions, 51 deletions
diff --git a/FireBase/FirebaseOptions.cs b/FireBase/FirebaseOptions.cs index 9905956..b4a5e51 100644 --- a/FireBase/FirebaseOptions.cs +++ b/FireBase/FirebaseOptions.cs @@ -1,76 +1,52 @@ -namespace Firebase.Database +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Firebase.Database.Offline; +using Newtonsoft.Json; + +namespace Firebase.Database { - using System; - using System.Collections.Generic; - using System.IO; - using System.Threading.Tasks; - - using Firebase.Database.Offline; - - using Newtonsoft.Json; - public class FirebaseOptions { public FirebaseOptions() { - this.OfflineDatabaseFactory = (t, s) => new Dictionary<string, OfflineEntry>(); - this.SubscriptionStreamReaderFactory = s => new StreamReader(s); - this.JsonSerializerSettings = new JsonSerializerSettings(); - this.SyncPeriod = TimeSpan.FromSeconds(10); + OfflineDatabaseFactory = (t, s) => new Dictionary<string, OfflineEntry>(); + SubscriptionStreamReaderFactory = s => new StreamReader(s); + JsonSerializerSettings = new JsonSerializerSettings(); + SyncPeriod = TimeSpan.FromSeconds(10); } /// <summary> - /// Gets or sets the factory for Firebase offline database. Default is in-memory dictionary. + /// Gets or sets the factory for Firebase offline database. Default is in-memory dictionary. /// </summary> - public Func<Type, string, IDictionary<string, OfflineEntry>> OfflineDatabaseFactory - { - get; - set; - } + public Func<Type, string, IDictionary<string, OfflineEntry>> OfflineDatabaseFactory { get; set; } /// <summary> - /// Gets or sets the method for retrieving auth tokens. Default is null. + /// Gets or sets the method for retrieving auth tokens. Default is null. /// </summary> - public Func<Task<string>> AuthTokenAsyncFactory - { - get; - set; - } + public Func<Task<string>> AuthTokenAsyncFactory { get; set; } /// <summary> - /// Gets or sets the factory for <see cref="TextReader"/> used for reading online streams. Default is <see cref="StreamReader"/>. + /// Gets or sets the factory for <see cref="TextReader" /> used for reading online streams. Default is + /// <see cref="StreamReader" />. /// </summary> - public Func<Stream, TextReader> SubscriptionStreamReaderFactory - { - get; - set; - } + public Func<Stream, TextReader> SubscriptionStreamReaderFactory { get; set; } /// <summary> - /// Gets or sets the json serializer settings. + /// Gets or sets the json serializer settings. /// </summary> - public JsonSerializerSettings JsonSerializerSettings - { - get; - set; - } + public JsonSerializerSettings JsonSerializerSettings { get; set; } /// <summary> - /// Gets or sets the time between synchronization attempts for pulling and pushing offline entities. Default is 10 seconds. + /// Gets or sets the time between synchronization attempts for pulling and pushing offline entities. Default is 10 + /// seconds. /// </summary> - public TimeSpan SyncPeriod - { - get; - set; - } + public TimeSpan SyncPeriod { get; set; } /// <summary> - /// Specify if token returned by factory will be used as "auth" url parameter or "access_token". + /// Specify if token returned by factory will be used as "auth" url parameter or "access_token". /// </summary> - public bool AsAccessToken - { - get; - set; - } + public bool AsAccessToken { get; set; } } -} +}
\ No newline at end of file |