RestrictionValidatorHelper¶
Namespace: ThinkGeo.Core
Contains guard helpers used by RestrictionLayer to validate enums and styles.
public static class RestrictionValidatorHelper
Inheritance object → RestrictionValidatorHelper
Methods¶
CheckRestrictionModeIsValid(RestrictionMode, string)¶
Ensures the supplied RestrictionMode value is supported.
public static void CheckRestrictionModeIsValid(RestrictionMode restrictionMode, string parameterName)
Parameters¶
restrictionMode RestrictionMode
The mode to validate.
parameterName string
The calling parameter name used in exception messages.
Returns¶
CheckRestrictionStyleIsValid(RestrictionStyle, string)¶
Ensures the supplied RestrictionStyle value is supported.
public static void CheckRestrictionStyleIsValid(RestrictionStyle restrictionStyle, string parameterName)
Parameters¶
restrictionStyle RestrictionStyle
The style to validate.
parameterName string
The calling parameter name used in exception messages.
Returns¶
CheckRestrictionStyleIsNotConflicted(RestrictionStyle, IEnumerable<Style>)¶
Ensures that custom styles are only used when RestrictionStyle.UseCustomStyles is selected.
public static void CheckRestrictionStyleIsNotConflicted(RestrictionStyle restrictionStyle, IEnumerable<Style> customStyles)
Parameters¶
restrictionStyle RestrictionStyle
The active restriction style.
customStyles IEnumerable<Style>
The custom style collection.