C# Class ExoRule.Condition

Represents an condition established based on a specific ConditionType instance.
Mostrar archivo Open project: vc3/ExoRule

Public Methods

Method Description
AddTarget ( object target ) : void

Adds an additional target to the condition.

Condition ( ConditionType type, object target ) : System

Creates a new Condition based on the specified ConditionType.

Condition ( ConditionType type, string message, object target ) : System

Creates a new Condition based on the specified ConditionType and error message.

GetConditions ( ModelInstance instance ) : IEnumerable

Gets the set of Condition instances associated with the specified ModelInstance.

GetConditions ( ModelInstance instance, bool>.Func filter ) : IEnumerable

Gets the set of Condition instances associated with the specified ModelInstance.

GetConditions ( object instance ) : IEnumerable

Gets the set of Condition instances associated with the specified ModelInstance.

Private Methods

Method Description
AddTarget ( ModelInstance target, IEnumerable steps ) : void

Recursively attaches the current condition to targets in the model.

Destroy ( ) : void

Destroys the current exception.

Method Details

AddTarget() public method

Adds an additional target to the condition.
public AddTarget ( object target ) : void
target object
return void

Condition() public method

Creates a new Condition based on the specified ConditionType.
public Condition ( ConditionType type, object target ) : System
type ConditionType
target object
return System

Condition() public method

Creates a new Condition based on the specified ConditionType and error message.
public Condition ( ConditionType type, string message, object target ) : System
type ConditionType
message string
target object
return System

GetConditions() public static method

Gets the set of Condition instances associated with the specified ModelInstance.
public static GetConditions ( ModelInstance instance ) : IEnumerable
instance ModelInstance
return IEnumerable

GetConditions() public static method

Gets the set of Condition instances associated with the specified ModelInstance.
public static GetConditions ( ModelInstance instance, bool>.Func filter ) : IEnumerable
instance ModelInstance
filter bool>.Func
return IEnumerable

GetConditions() public static method

Gets the set of Condition instances associated with the specified ModelInstance.
public static GetConditions ( object instance ) : IEnumerable
instance object
return IEnumerable