Skip to content

Commit

Permalink
Surfaced the method CountMatchingDefinitionDetails, available in an e…
Browse files Browse the repository at this point in the history
…arlier version of the package, via the IGroupMatchingService interface.
  • Loading branch information
AndyButland committed Apr 21, 2024
1 parent dd15c11 commit 16db9af
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<PropertyGroup>
<Version>3.2.10</Version>
<AssemblyVersion>3.2.10</AssemblyVersion>
<InformationalVersion>3.2.10</InformationalVersion>
<FileVersion>3.2.10</FileVersion>
<Version>3.3.0</Version>
<AssemblyVersion>3.3.0</AssemblyVersion>
<InformationalVersion>3.3.0</InformationalVersion>
<FileVersion>3.3.0</FileVersion>
<LangVersion Condition="'$(LangVersion)' == ''">10.0</LangVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<TargetFramework>net5.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public bool MatchGroups(IList<IPublishedContent> pickedGroups)
/// </summary>
/// <param name="definition">Personalisation group definition</param>
/// <returns>Number of definition details that match</returns>
private int CountMatchingDefinitionDetails(PersonalisationGroupDefinition definition)
public int CountMatchingDefinitionDetails(PersonalisationGroupDefinition definition)
{
var matchCount = 0;
foreach (var detail in definition.Details)
Expand Down
2 changes: 2 additions & 0 deletions PersonalisationGroups.Core/Services/IGroupMatchingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public interface IGroupMatchingService

bool MatchGroups(IList<IPublishedContent> pickedGroups);

int CountMatchingDefinitionDetails(PersonalisationGroupDefinition definition);

bool MatchGroupsByName(string[] groupNames, IList<IPublishedContent> groups, PersonalisationGroupDefinitionMatch matchType);

int ScoreGroup(IPublishedContent pickedGroup);
Expand Down
4 changes: 3 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,6 @@ See [here](https://github.com/AndyButland/UmbracoPersonalisationGroups#version-h
- 3.2.9
- Extended version range to support Umbraco 13.
- 3.2.10
- Fixed cookie and session criteria such that checking for "does not match regex" with a missing cookie or session key returns true.
- Fixed cookie and session criteria such that checking for "does not match regex" with a missing cookie or session key returns true.
- 3.3.0
- Surfaced the method `CountMatchingDefinitionDetails`, available in an earlier version of the package, via the `IGroupMatchingService` interface.

0 comments on commit 16db9af

Please sign in to comment.