summaryrefslogtreecommitdiff
path: root/FireBase/Query/ChildQuery.cs
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-05-19 17:40:59 +0200
committernatrixaeria <janng@gmx.de>2019-05-19 17:40:59 +0200
commit1509b5ef3d7e9e71d9294e234ec0e39f2d831998 (patch)
tree78300ffff230958101b422a4e6026925b287822f /FireBase/Query/ChildQuery.cs
parentc3bb858bb54dc8c64bbd48054c2c58dc0073f09c (diff)
parentc4d046858e0822b7c2c540ac2368b2c0e88e7a26 (diff)
Merge branch 'scribble' of https://github.com/TrueDoctor/DiscoBot into scribble
Diffstat (limited to 'FireBase/Query/ChildQuery.cs')
-rw-r--r--FireBase/Query/ChildQuery.cs28
1 files changed, 11 insertions, 17 deletions
diff --git a/FireBase/Query/ChildQuery.cs b/FireBase/Query/ChildQuery.cs
index 1696ea8..014fe09 100644
--- a/FireBase/Query/ChildQuery.cs
+++ b/FireBase/Query/ChildQuery.cs
@@ -1,16 +1,16 @@
+using System;
+
namespace Firebase.Database.Query
{
- using System;
-
/// <summary>
- /// Firebase query which references the child of current node.
+ /// 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.
+ /// 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>
@@ -22,7 +22,7 @@ namespace Firebase.Database.Query
}
/// <summary>
- /// Initializes a new instance of the <see cref="ChildQuery"/> class.
+ /// 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>
@@ -32,25 +32,19 @@ namespace Firebase.Database.Query
}
/// <summary>
- /// Build the url segment of this child.
+ /// Build the url segment of this child.
/// </summary>
/// <param name="child"> The child of this child. </param>
- /// <returns> The <see cref="string"/>. </returns>
+ /// <returns> The <see cref="string" />. </returns>
protected override string BuildUrlSegment(FirebaseQuery child)
{
- var s = this.pathFactory();
+ var s = pathFactory();
- if (s != string.Empty && !s.EndsWith("/"))
- {
- s += '/';
- }
+ if (s != string.Empty && !s.EndsWith("/")) s += '/';
- if (!(child is ChildQuery))
- {
- return s + ".json";
- }
+ if (!(child is ChildQuery)) return s + ".json";
return s;
}
}
-}
+} \ No newline at end of file