Class StringMatchHelper
Determines whether the values match according to it's match type
Inheritance
Namespace: EPiServer.Personalization.VisitorGroups
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3Syntax
public static class StringMatchHelper : Object
Methods
GetMatchOptions()
Gets the match options.
Declaration
public static IEnumerable<SelectListItem> GetMatchOptions()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> |
GetMatchOptions(MatchStringType)
Gets the match options.
Declaration
public static IEnumerable<SelectListItem> GetMatchOptions(MatchStringType selectedMatchType)
Parameters
Type | Name | Description |
---|---|---|
MatchStringType | selectedMatchType | Type of the selected match. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> |
GetMatchOptions(MatchStringType, LocalizationService)
Gets the match options.
Declaration
public static IEnumerable<SelectListItem> GetMatchOptions(MatchStringType selectedMatchType, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
MatchStringType | selectedMatchType | Type of the selected match. |
LocalizationService | localizationService | The resource locator that should be used by the method to get localized strings. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> |
GetMatchStringType(String)
Gets the match string type from a string value.
Declaration
public static MatchStringType GetMatchStringType(string matchStringType)
Parameters
Type | Name | Description |
---|---|---|
System.String | matchStringType | Type of the match as string. |
Returns
Type | Description |
---|---|
MatchStringType |
IsMatch(String, String, MatchStringType)
Matches the value in a criteria with the value in a setting depending on the matchtype.
Declaration
public static bool IsMatch(string criteriaValue, string settingsValue, MatchStringType matchType)
Parameters
Type | Name | Description |
---|---|---|
System.String | criteriaValue | The value from the criteria. |
System.String | settingsValue | The value from the setting. |
MatchStringType | matchType | How to perform the match. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsMatch(String, String, String)
Matches the value in a criteria with the value in a setting depending on the matchtype.
Declaration
public static bool IsMatch(string criteriaValue, string settingsValue, string matchType)
Parameters
Type | Name | Description |
---|---|---|
System.String | criteriaValue | The value from the criteria. |
System.String | settingsValue | The value from the setting. |
System.String | matchType | How to perform the match. |
Returns
Type | Description |
---|---|
System.Boolean |
|