diff options
Diffstat (limited to 'FireBase/FirebaseClient.cs')
-rw-r--r-- | FireBase/FirebaseClient.cs | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/FireBase/FirebaseClient.cs b/FireBase/FirebaseClient.cs index 8795668..3079f3b 100644 --- a/FireBase/FirebaseClient.cs +++ b/FireBase/FirebaseClient.cs @@ -1,30 +1,26 @@ +using System; using System.Net.Http; +using System.Runtime.CompilerServices; +using Firebase.Database.Query; -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Firebase.Database.Tests")] +[assembly: InternalsVisibleTo("Firebase.Database.Tests")] namespace Firebase.Database { - using System; - using System.Collections.Generic; - using System.Threading.Tasks; - using Offline; - using Query; - /// <summary> - /// Firebase client which acts as an entry point to the online database. + /// Firebase client which acts as an entry point to the online database. /// </summary> public class FirebaseClient : IDisposable { + private readonly string baseUrl; internal readonly HttpClient HttpClient; internal readonly FirebaseOptions Options; - private readonly string baseUrl; - /// <summary> - /// Initializes a new instance of the <see cref="FirebaseClient"/> class. + /// Initializes a new instance of the <see cref="FirebaseClient" /> class. /// </summary> /// <param name="baseUrl"> The base url. </param> - /// <param name="offlineDatabaseFactory"> Offline database. </param> + /// <param name="offlineDatabaseFactory"> Offline database. </param> public FirebaseClient(string baseUrl, FirebaseOptions options = null) { HttpClient = new HttpClient(); @@ -35,19 +31,19 @@ namespace Firebase.Database if (!this.baseUrl.EndsWith("/")) this.baseUrl += "/"; } + public void Dispose() + { + HttpClient?.Dispose(); + } + /// <summary> - /// Queries for a child of the data root. + /// Queries for a child of the data root. /// </summary> /// <param name="resourceName"> Name of the child. </param> - /// <returns> <see cref="ChildQuery"/>. </returns> + /// <returns> <see cref="ChildQuery" />. </returns> public ChildQuery Child(string resourceName) { return new ChildQuery(this, () => baseUrl + resourceName); } - - public void Dispose() - { - HttpClient?.Dispose(); - } } }
\ No newline at end of file |