Table of Contents

Class RuleService

Namespace
Dynamicweb.Forms.Rules
Assembly
Dynamicweb.Forms.dll

Represents the functionality for the Rule.

public class RuleService
Inheritance
RuleService
Inherited Members

Methods

ClearCache()

Clears the rules cache.

public void ClearCache()

DeleteRule(Rule)

Removes the rule.

public void DeleteRule(Rule rule)

Parameters

rule Rule

The rule for delete.

DeleteRules(Field)

Removes all rules from field.

public void DeleteRules(Field field)

Parameters

field Field

The field where rules should be removed.

DeleteRules(IEnumerable<int>)

Removes rules by IDs.

public void DeleteRules(IEnumerable<int> ruleIds)

Parameters

ruleIds IEnumerable<int>

The collection of rule IDs.

FindRule(Field, ConditionType)

Finds the Rule with the specified condition type in field rules.

public Rule? FindRule(Field field, ConditionType conditionType)

Parameters

field Field

The Field to search.

conditionType ConditionType

The condition type to search.

Returns

Rule

The found Rule, or null.

FindRule(int, ConditionType)

Finds the Rule with the specified condition type in field rules.

public Rule? FindRule(int fieldId, ConditionType conditionType)

Parameters

fieldId int

The ID of Field to search.

conditionType ConditionType

The condition type to search.

Returns

Rule

The found Rule, or null.

GetRule(int)

Gets the Rule by ID.

public Rule? GetRule(int id)

Parameters

id int

The Rule ID.

Returns

Rule

The rule, or null.

GetRules()

Gets all rules.

public IEnumerable<Rule> GetRules()

Returns

IEnumerable<Rule>

A collection of rules.

GetRulesByFieldId(int)

Gets all rules by field ID.

public IEnumerable<Rule> GetRulesByFieldId(int fieldId)

Parameters

fieldId int

The Field ID.

Returns

IEnumerable<Rule>

A collection of rules.

GetRulesByTargetFieldId(int)

Gets all rules by target field ID.

public IEnumerable<Rule> GetRulesByTargetFieldId(int targetFieldId)

Parameters

targetFieldId int

The target Field ID.

Returns

IEnumerable<Rule>

A collection of rules.

Save(Rule)

Saves the rule.

public void Save(Rule rule)

Parameters

rule Rule

The rule for save.

To top