From c4d046858e0822b7c2c540ac2368b2c0e88e7a26 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 19 May 2019 17:00:02 +0200 Subject: general refectoring added 42 as dummy Token --- FireBase/Query/QueryFactoryExtensions.cs | 85 ++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 37 deletions(-) (limited to 'FireBase/Query/QueryFactoryExtensions.cs') diff --git a/FireBase/Query/QueryFactoryExtensions.cs b/FireBase/Query/QueryFactoryExtensions.cs index b54c315..71dae5c 100644 --- a/FireBase/Query/QueryFactoryExtensions.cs +++ b/FireBase/Query/QueryFactoryExtensions.cs @@ -1,173 +1,184 @@ +using System; + namespace Firebase.Database.Query { - using System; - /// - /// Query extensions providing linq like syntax for firebase server methods. + /// Query extensions providing linq like syntax for firebase server methods. /// public static class QueryFactoryExtensions { /// - /// Adds an auth parameter to the query. + /// Adds an auth parameter to the query. /// /// The child. /// The auth token. - /// The . + /// The . internal static AuthQuery WithAuth(this FirebaseQuery node, Func tokenFactory) { return new AuthQuery(node, tokenFactory, node.Client); } /// - /// References a sub child of the existing node. + /// References a sub child of the existing node. /// /// The child. /// The path of sub child. - /// The . + /// The . public static ChildQuery Child(this ChildQuery node, Func pathFactory) { return new ChildQuery(node, pathFactory, node.Client); } /// - /// Order data by given . Note that this is used mainly for following filtering queries and due to firebase implementation - /// the data may actually not be ordered. + /// Order data by given . Note that this is used mainly for following filtering + /// queries and due to firebase implementation + /// the data may actually not be ordered. /// /// The child. /// The property name. - /// The . + /// The . public static OrderQuery OrderBy(this ChildQuery child, Func propertyNameFactory) { return new OrderQuery(child, propertyNameFactory, child.Client); } /// - /// Order data by $key. Note that this is used mainly for following filtering queries and due to firebase implementation - /// the data may actually not be ordered. + /// Order data by $key. Note that this is used mainly for following filtering queries and due to firebase + /// implementation + /// the data may actually not be ordered. /// /// The child. - /// The . + /// The . public static OrderQuery OrderByKey(this ChildQuery child) { return child.OrderBy("$key"); } /// - /// Order data by $value. Note that this is used mainly for following filtering queries and due to firebase implementation - /// the data may actually not be ordered. + /// Order data by $value. Note that this is used mainly for following filtering queries and due to firebase + /// implementation + /// the data may actually not be ordered. /// /// The child. - /// The . + /// The . public static OrderQuery OrderByValue(this ChildQuery child) { return child.OrderBy("$value"); } /// - /// Order data by $priority. Note that this is used mainly for following filtering queries and due to firebase implementation - /// the data may actually not be ordered. + /// Order data by $priority. Note that this is used mainly for following filtering queries and due to firebase + /// implementation + /// the data may actually not be ordered. /// /// The child. - /// The . + /// The . public static OrderQuery OrderByPriority(this ChildQuery child) { return child.OrderBy("$priority"); } /// - /// Instructs firebase to send data greater or equal to the . This must be preceded by an OrderBy query. + /// Instructs firebase to send data greater or equal to the . This must be preceded by an + /// OrderBy query. /// /// Current node. /// Value to start at. - /// The . + /// The . public static FilterQuery StartAt(this ParameterQuery child, Func valueFactory) { return new FilterQuery(child, () => "startAt", valueFactory, child.Client); } /// - /// Instructs firebase to send data lower or equal to the . This must be preceded by an OrderBy query. + /// Instructs firebase to send data lower or equal to the . This must be preceded by an + /// OrderBy query. /// /// Current node. /// Value to start at. - /// The . + /// The . public static FilterQuery EndAt(this ParameterQuery child, Func valueFactory) { return new FilterQuery(child, () => "endAt", valueFactory, child.Client); } /// - /// Instructs firebase to send data equal to the . This must be preceded by an OrderBy query. + /// Instructs firebase to send data equal to the . This must be preceded by an OrderBy + /// query. /// /// Current node. /// Value to start at. - /// The . + /// The . public static FilterQuery EqualTo(this ParameterQuery child, Func valueFactory) { return new FilterQuery(child, () => "equalTo", valueFactory, child.Client); } /// - /// Instructs firebase to send data greater or equal to the . This must be preceded by an OrderBy query. + /// Instructs firebase to send data greater or equal to the . This must be preceded by an + /// OrderBy query. /// /// Current node. /// Value to start at. - /// The . + /// The . public static FilterQuery StartAt(this ParameterQuery child, Func valueFactory) { return new FilterQuery(child, () => "startAt", valueFactory, child.Client); } /// - /// Instructs firebase to send data lower or equal to the . This must be preceded by an OrderBy query. + /// Instructs firebase to send data lower or equal to the . This must be preceded by an + /// OrderBy query. /// /// Current node. /// Value to start at. - /// The . + /// The . public static FilterQuery EndAt(this ParameterQuery child, Func valueFactory) { return new FilterQuery(child, () => "endAt", valueFactory, child.Client); } /// - /// Instructs firebase to send data equal to the . This must be preceded by an OrderBy query. + /// Instructs firebase to send data equal to the . This must be preceded by an OrderBy + /// query. /// /// Current node. /// Value to start at. - /// The . + /// The . public static FilterQuery EqualTo(this ParameterQuery child, Func valueFactory) { return new FilterQuery(child, () => "equalTo", valueFactory, child.Client); } /// - /// Instructs firebase to send data equal to the . This must be preceded by an OrderBy query. + /// Instructs firebase to send data equal to the . This must be preceded by an OrderBy + /// query. /// /// Current node. /// Value to start at. - /// The . + /// The . public static FilterQuery EqualTo(this ParameterQuery child, Func valueFactory) { return new FilterQuery(child, () => "equalTo", valueFactory, child.Client); } /// - /// Limits the result to first items. + /// Limits the result to first items. /// /// Current node. /// Number of elements. - /// The . + /// The . public static FilterQuery LimitToFirst(this ParameterQuery child, Func countFactory) { return new FilterQuery(child, () => "limitToFirst", () => countFactory(), child.Client); } /// - /// Limits the result to last items. + /// Limits the result to last items. /// /// Current node. /// Number of elements. - /// The . + /// The . public static FilterQuery LimitToLast(this ParameterQuery child, Func countFactory) { return new FilterQuery(child, () => "limitToLast", () => countFactory(), child.Client); -- cgit v1.2.3-70-g09d2