Rules Methods



Add(RuleName as String) as Integer

Adds new rule in the Rules set as last item. RuleName must be unique in Rules scope. Returns Index of new added rule. Later you can change index with Rules.Exchange or with Rules.Move.

Insert(Index as Integer, RuleName as String)

Inserts new rule in the Rules set at position, specified by Index parameter. RuleName must be unique in Rules scope.

DeleteByIndex(Index as Integer)

Deletes Rule, specified by Index.

DeleteByName(RuleName as String)

Deletes Rule, specified by it's RuleName.

DeleteByGUID(RuleID as String)

Deletes Rule, specified by RuleID (each Rule has unique ID).

Exchange(Index1, Index2 as Integer)

Exchanges two Rules, specified by Index1 and Index2.

Move(CurIndex, NewIndex as Integer)

Moves Rule with index CurIndex to the NewIndex.

FindByName(RuleName as String) as Rule

Finds Rule with name, specified by RuleName and returns Rule object or NULL, if not found.

FindByGUID(RuleID as String) as Rule

Finds Rule with GUID, specified by RuleID and returns Rule object or NULL, if not found.

Clear

Remove all rules from Rules set.