Skip to content

RestrictionValidatorHelper

Namespace: ThinkGeo.Core

Contains guard helpers used by RestrictionLayer to validate enums and styles.

public static class RestrictionValidatorHelper

Inheritance objectRestrictionValidatorHelper

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

void

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

void

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.

Returns

void