Class StringMatchHelper

Determines whether the values match according to it's match type

Inheritance
System.Object
StringMatchHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Personalization.VisitorGroups
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public static class StringMatchHelper

Methods

GetMatchOptions()

Gets the match options.

Declaration
public static IEnumerable<SelectListItem> GetMatchOptions()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Web.Mvc.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<System.Web.Mvc.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<System.Web.Mvc.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

true if the the values match; otherwise, false.

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

true if the the values match; otherwise, false.