From 304437b834e8c87687f68333ae67a13ee1377a73 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Wed, 12 Jun 2019 21:47:51 +0200 Subject: Adjust Codestyle --- dsa/FireBase/Query/QueryExtensions.cs | 60 ++++++++++++----------------------- 1 file changed, 20 insertions(+), 40 deletions(-) (limited to 'dsa/FireBase/Query/QueryExtensions.cs') diff --git a/dsa/FireBase/Query/QueryExtensions.cs b/dsa/FireBase/Query/QueryExtensions.cs index df2edfc..b86a877 100644 --- a/dsa/FireBase/Query/QueryExtensions.cs +++ b/dsa/FireBase/Query/QueryExtensions.cs @@ -3,21 +3,18 @@ using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json; -namespace Firebase.Database.Query -{ +namespace Firebase.Database.Query { /// /// Query extensions providing linq like syntax for firebase server methods. /// - public static class QueryExtensions - { + public static class QueryExtensions { /// /// Adds an auth parameter to the query. /// /// The child. /// The auth token. /// The . - internal static AuthQuery WithAuth(this FirebaseQuery node, string token) - { + internal static AuthQuery WithAuth(this FirebaseQuery node, string token) { return node.WithAuth(() => token); } @@ -26,8 +23,7 @@ namespace Firebase.Database.Query /// /// The child. /// The . - internal static SilentQuery Silent(this FirebaseQuery node) - { + internal static SilentQuery Silent(this FirebaseQuery node) { return new SilentQuery(node, node.Client); } @@ -37,8 +33,7 @@ namespace Firebase.Database.Query /// The child. /// The path of sub child. /// The . - public static ChildQuery Child(this ChildQuery node, string path) - { + public static ChildQuery Child(this ChildQuery node, string path) { return node.Child(() => path); } @@ -50,8 +45,7 @@ namespace Firebase.Database.Query /// The child. /// The property name. /// The . - public static OrderQuery OrderBy(this ChildQuery child, string propertyName) - { + public static OrderQuery OrderBy(this ChildQuery child, string propertyName) { return child.OrderBy(() => propertyName); } @@ -62,8 +56,7 @@ namespace Firebase.Database.Query /// Current node. /// Value to start at. /// The . - public static FilterQuery StartAt(this ParameterQuery child, string value) - { + public static FilterQuery StartAt(this ParameterQuery child, string value) { return child.StartAt(() => value); } @@ -74,8 +67,7 @@ namespace Firebase.Database.Query /// Current node. /// Value to start at. /// The . - public static FilterQuery EndAt(this ParameterQuery child, string value) - { + public static FilterQuery EndAt(this ParameterQuery child, string value) { return child.EndAt(() => value); } @@ -85,8 +77,7 @@ namespace Firebase.Database.Query /// Current node. /// Value to start at. /// The . - public static FilterQuery EqualTo(this ParameterQuery child, string value) - { + public static FilterQuery EqualTo(this ParameterQuery child, string value) { return child.EqualTo(() => value); } @@ -97,8 +88,7 @@ namespace Firebase.Database.Query /// Current node. /// Value to start at. /// The . - public static FilterQuery StartAt(this ParameterQuery child, double value) - { + public static FilterQuery StartAt(this ParameterQuery child, double value) { return child.StartAt(() => value); } @@ -109,8 +99,7 @@ namespace Firebase.Database.Query /// Current node. /// Value to start at. /// The . - public static FilterQuery EndAt(this ParameterQuery child, double value) - { + public static FilterQuery EndAt(this ParameterQuery child, double value) { return child.EndAt(() => value); } @@ -120,8 +109,7 @@ namespace Firebase.Database.Query /// Current node. /// Value to start at. /// The . - public static FilterQuery EqualTo(this ParameterQuery child, double value) - { + public static FilterQuery EqualTo(this ParameterQuery child, double value) { return child.EqualTo(() => value); } @@ -131,8 +119,7 @@ namespace Firebase.Database.Query /// Current node. /// Value to start at. /// The . - public static FilterQuery EqualTo(this ParameterQuery child, bool value) - { + public static FilterQuery EqualTo(this ParameterQuery child, bool value) { return child.EqualTo(() => value); } @@ -141,8 +128,7 @@ namespace Firebase.Database.Query /// /// Current node. /// The . - public static FilterQuery EqualTo(this ParameterQuery child) - { + public static FilterQuery EqualTo(this ParameterQuery child) { return child.EqualTo(() => null); } @@ -152,8 +138,7 @@ namespace Firebase.Database.Query /// Current node. /// Number of elements. /// The . - public static FilterQuery LimitToFirst(this ParameterQuery child, int count) - { + public static FilterQuery LimitToFirst(this ParameterQuery child, int count) { return child.LimitToFirst(() => count); } @@ -163,24 +148,20 @@ namespace Firebase.Database.Query /// Current node. /// Number of elements. /// The . - public static FilterQuery LimitToLast(this ParameterQuery child, int count) - { + public static FilterQuery LimitToLast(this ParameterQuery child, int count) { return child.LimitToLast(() => count); } - public static Task PutAsync(this FirebaseQuery query, T obj) - { + public static Task PutAsync(this FirebaseQuery query, T obj) { return query.PutAsync(JsonConvert.SerializeObject(obj, query.Client.Options.JsonSerializerSettings)); } - public static Task PatchAsync(this FirebaseQuery query, T obj) - { + public static Task PatchAsync(this FirebaseQuery query, T obj) { return query.PatchAsync(JsonConvert.SerializeObject(obj, query.Client.Options.JsonSerializerSettings)); } public static async Task> PostAsync(this FirebaseQuery query, T obj, - bool generateKeyOffline = true) - { + bool generateKeyOffline = true) { var result = await query.PostAsync(JsonConvert.SerializeObject(obj, query.Client.Options.JsonSerializerSettings), generateKeyOffline); @@ -196,8 +177,7 @@ namespace Firebase.Database.Query /// Current node. /// Object to fan out. /// Locations where to store the item. - public static async Task FanOut(this ChildQuery child, T item, params string[] relativePaths) - { + public static async Task FanOut(this ChildQuery child, T item, params string[] relativePaths) { if (relativePaths == null) throw new ArgumentNullException(nameof(relativePaths)); var fanoutObject = new Dictionary(relativePaths.Length); -- cgit v1.2.3-54-g00ecf