Click or drag to resize

Rule Class

Base class for inline rule definitions. To create a rule using internal DSL, create a class that inherits from NRules.Fluent.Dsl.Rule and override Define method. Use When and Then methods to define rule's conditions and actions correspondingly. A rule can also be decorated with attributes to add relevant metadata: NameAttribute, DescriptionAttribute, TagAttribute, PriorityAttribute, RepeatabilityAttribute.
Inheritance Hierarchy
SystemObject
  NRules.Fluent.DslRule

Namespace:  NRules.Fluent.Dsl
Assembly:  NRules.Fluent (in NRules.Fluent.dll) Version: 0.8.4
Syntax
C#
public abstract class Rule

The Rule type exposes the following members.

Constructors
  NameDescription
Protected methodRule
Initializes a new instance of the Rule class
Top
Methods
  NameDescription
Public methodDefine
Method called by the rules engine to define the rule.
Protected methodDependency
Returns expression builder for rule's dependencies.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFilter
Returns expression builder for rule's filters.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodName
Sets rule's name. Name value set at this level overrides the values specified via NameAttribute attribute.
Protected methodPriority
Sets rule's priority. Priority value set at this level overrides the value specified via PriorityAttribute attribute.
Protected methodThen
Returns expression builder for rule's right hand side (actions).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodWhen
Returns expression builder for rule's left hand side (conditions).
Top
See Also