using System; namespace Firebase.Database.Query { /// /// Represents a firebase ordering query, e.g. "?OrderBy=Foo". /// public class OrderQuery : ParameterQuery { private readonly Func propertyNameFactory; /// /// Initializes a new instance of the class. /// /// The query parent. /// The property name. /// The owning client. public OrderQuery(ChildQuery parent, Func propertyNameFactory, FirebaseClient client) : base(parent, () => "orderBy", client) { this.propertyNameFactory = propertyNameFactory; } /// /// The build url parameter. /// /// The child. /// The . protected override string BuildUrlParameter(FirebaseQuery child) { return $"\"{propertyNameFactory()}\""; } } }