summaryrefslogtreecommitdiff
path: root/FireBase/FirebaseClient.cs
diff options
context:
space:
mode:
authorDennis Kobert <d-kobert@web.de>2019-05-19 17:00:02 +0200
committerDennis Kobert <d-kobert@web.de>2019-05-19 17:00:02 +0200
commitc4d046858e0822b7c2c540ac2368b2c0e88e7a26 (patch)
tree8ff5cfd8646908784a45762a6148ebc150810160 /FireBase/FirebaseClient.cs
parentf89f308c525e9deebc6d2cf6416e27dfe1a299dc (diff)
general refectoring
added 42 as dummy Token
Diffstat (limited to 'FireBase/FirebaseClient.cs')
-rw-r--r--FireBase/FirebaseClient.cs34
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