Interface IFormComponentVisibilityEvaluator
Defines interface for evaluator of form component visibility conditions.
public interface IFormComponentVisibilityEvaluator
- Extension Methods
Methods
IsComponentVisible(FormComponent, IEnumerable<FormComponent>, IEnumerable<FormComponent>)
Evaluates VisibilityCondition of given component
.
If the component depends on another fields, the visibility condition is evaluated against provided visibleComponents
.
bool IsComponentVisible(FormComponent component, IEnumerable<FormComponent> visibleComponents, IEnumerable<FormComponent> components)
Parameters
component
FormComponentForm component which visibility condition is evaluated.
visibleComponents
IEnumerable<FormComponent>Visible form components.
components
IEnumerable<FormComponent>Form components defined in the component properties class.
Returns
- bool
true
if the component is visible or visibility condition isnull
, otherwisefalse
.false
is also returned when visibility condition depends on another field which is not present invisibleComponents
enumeration.
Exceptions
- ArgumentNullException
Thrown when
component
orvisibleComponents
isnull
.