/// <summary> /// Checks if a given detail record of a personalisation group definition matches the current site visitor /// </summary> /// <param name="definitionDetail">Personalisation group definition detail record</param> /// <returns>True of the current site visitor matches the definition</returns> public static bool IsMatch(PersonalisationGroupDefinitionDetail definitionDetail) { try { var criteria = AvailableCriteria[definitionDetail.Alias]; return(criteria.MatchesVisitor(definitionDetail.Definition)); } catch (KeyNotFoundException) { throw new KeyNotFoundException($"Personalisation group criteria not found with alias '{definitionDetail.Alias}'"); } }
/// <summary> /// Checks if a given detail record of a personalisation group definition matches the current site visitor /// </summary> /// <param name="definitionDetail">Personalisation group definition detail record</param> /// <returns>True of the current site visitor matches the definition</returns> public static bool IsMatch(PersonalisationGroupDefinitionDetail definitionDetail) { try { var criteria = AvailableCriteria[definitionDetail.Alias]; return criteria.MatchesVisitor(definitionDetail.Definition); } catch (KeyNotFoundException) { throw new KeyNotFoundException(string.Format("Personalisation group criteria not found with alias '{0}'", definitionDetail.Alias)); } }