summaryrefslogtreecommitdiff
path: root/FireBase/Query/ChildQuery.cs
diff options
context:
space:
mode:
authoruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:05:52 +0200
committeruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:05:52 +0200
commite6181c24124d97f2fbc932b8a68311e625463156 (patch)
treec1f097c344ca266b7941c9668590b0fd35c7870a /FireBase/Query/ChildQuery.cs
parent2490ad5d31fe2ac778ff9303776f0e91f47a2862 (diff)
Move dsa related stuff to subfolder
Diffstat (limited to 'FireBase/Query/ChildQuery.cs')
-rw-r--r--FireBase/Query/ChildQuery.cs50
1 files changed, 0 insertions, 50 deletions
diff --git a/FireBase/Query/ChildQuery.cs b/FireBase/Query/ChildQuery.cs
deleted file mode 100644
index 014fe09..0000000
--- a/FireBase/Query/ChildQuery.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using System;
-
-namespace Firebase.Database.Query
-{
- /// <summary>
- /// Firebase query which references the child of current node.
- /// </summary>
- public class ChildQuery : FirebaseQuery
- {
- private readonly Func<string> pathFactory;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ChildQuery" /> class.
- /// </summary>
- /// <param name="parent"> The parent. </param>
- /// <param name="pathFactory"> The path to the child node. </param>
- /// <param name="client"> The owner. </param>
- public ChildQuery(FirebaseQuery parent, Func<string> pathFactory, FirebaseClient client)
- : base(parent, client)
- {
- this.pathFactory = pathFactory;
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ChildQuery" /> class.
- /// </summary>
- /// <param name="client"> The client. </param>
- /// <param name="pathFactory"> The path to the child node. </param>
- public ChildQuery(FirebaseClient client, Func<string> pathFactory)
- : this(null, pathFactory, client)
- {
- }
-
- /// <summary>
- /// Build the url segment of this child.
- /// </summary>
- /// <param name="child"> The child of this child. </param>
- /// <returns> The <see cref="string" />. </returns>
- protected override string BuildUrlSegment(FirebaseQuery child)
- {
- var s = pathFactory();
-
- if (s != string.Empty && !s.EndsWith("/")) s += '/';
-
- if (!(child is ChildQuery)) return s + ".json";
-
- return s;
- }
- }
-} \ No newline at end of file