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/FirebaseOptions.cs | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 dsa/FireBase/FirebaseOptions.cs (limited to 'dsa/FireBase/FirebaseOptions.cs') diff --git a/dsa/FireBase/FirebaseOptions.cs b/dsa/FireBase/FirebaseOptions.cs new file mode 100644 index 0000000..b4a5e51 --- /dev/null +++ b/dsa/FireBase/FirebaseOptions.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Firebase.Database.Offline; +using Newtonsoft.Json; + +namespace Firebase.Database +{ + public class FirebaseOptions + { + public FirebaseOptions() + { + OfflineDatabaseFactory = (t, s) => new Dictionary(); + SubscriptionStreamReaderFactory = s => new StreamReader(s); + JsonSerializerSettings = new JsonSerializerSettings(); + SyncPeriod = TimeSpan.FromSeconds(10); + } + + /// + /// Gets or sets the factory for Firebase offline database. Default is in-memory dictionary. + /// + public Func> OfflineDatabaseFactory { get; set; } + + /// + /// Gets or sets the method for retrieving auth tokens. Default is null. + /// + public Func> AuthTokenAsyncFactory { get; set; } + + /// + /// Gets or sets the factory for used for reading online streams. Default is + /// . + /// + public Func SubscriptionStreamReaderFactory { get; set; } + + /// + /// Gets or sets the json serializer settings. + /// + public JsonSerializerSettings JsonSerializerSettings { get; set; } + + /// + /// Gets or sets the time between synchronization attempts for pulling and pushing offline entities. Default is 10 + /// seconds. + /// + public TimeSpan SyncPeriod { get; set; } + + /// + /// Specify if token returned by factory will be used as "auth" url parameter or "access_token". + /// + public bool AsAccessToken { get; set; } + } +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf