Skip to content

Commit

Permalink
optional constructor parms for TagQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendy committed Nov 26, 2018
1 parent 275f62c commit 3ca86e6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Our.Umbraco.Look/Models/TagQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@ public class TagQuery
/// when null, facets are not calculated, but when string[], each string value represents the tag group field to facet on, the empty string or whitespace = empty group
/// The count value for a returned tag indicates how may results would be expected should that tag be added into the AllTags collection of this query
/// </summary>
public string[] GetFacets { get; set; } = null;
public string[] GetFacets { get; set; }

/// <summary>
/// Create a new TagQuery
/// </summary>
/// <param name="all">All of these tags</param>
/// <param name="any">Any of these tags</param>
/// <param name="not">None of these tags</param>
/// <param name="getFacets">string array of tag groups to return facet counts for</param>
public TagQuery(LookTag[] all = null, LookTag[] any = null, LookTag[] not = null, string[] getFacets = null)
{
this.All = all;
this.Any = any;
this.Not = not;
this.GetFacets = getFacets;
}

/// <summary>
/// Helper to simplify the construction of LookTag array, by being able to supply a raw collection of tag strings
Expand Down

0 comments on commit 3ca86e6

Please sign in to comment.