Table of Contents

Class IEnumerableExtensions

Namespace
Kentico.Forms.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Extensions methods for System.Collections.Generic.IEnumerable<T> interface.

public static class IEnumerableExtensions
Inheritance
object
IEnumerableExtensions

Methods

GetDisplayedComponents(IEnumerable<FormComponent>, ContactInfo, BizFormInfo, BizFormItem, IFormComponentVisibilityEvaluator)

Returns filtered components which will be displayed in form based on given parameters.

public static IEnumerable<FormComponent> GetDisplayedComponents(this IEnumerable<FormComponent> components, ContactInfo contact, BizFormInfo formInfo, BizFormItem formItem, IFormComponentVisibilityEvaluator visibilityEvaluator)

Parameters

components IEnumerable<FormComponent>

Original collection of components.

contact ContactInfo

Contact for which the filter is performed, can be null.

formInfo BizFormInfo

Form representation.

formItem BizFormItem

Existing form item, can be null.

visibilityEvaluator IFormComponentVisibilityEvaluator

Form component visibility evaluator.

Returns

IEnumerable<FormComponent>

Filtered components.

GetVisibleComponents(IEnumerable<FormComponent>, IFormComponentVisibilityEvaluator)

Returns only components whose visibility condition evaluation results indicate that they should be displayed.

public static IEnumerable<FormComponent> GetVisibleComponents(this IEnumerable<FormComponent> components, IFormComponentVisibilityEvaluator visibilityEvaluator)

Parameters

components IEnumerable<FormComponent>

Components collection.

visibilityEvaluator IFormComponentVisibilityEvaluator

Visibility condition evaluator.

Returns

IEnumerable<FormComponent>