Click or drag to resize

DataConditionModel Class

The DataCondition condition returns true when a comparison between two values is successful.
Inheritance Hierarchy

Namespace:  Livit.Learn.Model.Conditions
Assembly:  Livit.Learn.Model (in Livit.Learn.Model.dll) Version: 0.0.0.0
Syntax
C#
[SerializableAttribute]
public class DataConditionModel : ConditionModel, 
	ITargetModel

The DataConditionModel type exposes the following members.

Constructors
  NameDescription
Public methodDataConditionModel
Initializes a new instance of the DataConditionModel class
Top
Properties
  NameDescription
Public propertyAttached
Defines an attached property.
(Inherited from BaseModel.)
Public propertyComments
(Development) Includes comments in the XML code.
(Inherited from BaseModel.)
Public propertyComparison
Defines the type of comparison to be made.
Public propertyCode exampleDataContext
Contains a source of all bindings defined for element.
(Inherited from BaseModel.)
Public propertyExternalXmlPath (Inherited from BaseModel.)
Public propertyId
Defines a unique identifier for an element in the simulation.
(Inherited from BaseModel.)
Public propertyIsIdAutogenerated (Inherited from BaseModel.)
Public propertyTarget
Specifies the target object.
Public propertyTemplateVersionId
Contains a id of source template.
(Inherited from BaseModel.)
Public propertyValue
Defines the value against which the Comparison will be made.
Public propertyXmlComments
(Development) Used as temporary storage for XML comments (like ) to keep them.
(Inherited from BaseModel.)
Top
Methods
  NameDescription
Public methodDeepCopy
Creates an in-memory clone of this object using a BinaryFormatter to ensure all child properties are copied as well.
(Inherited from BaseModel.)
Public methodShallowCopy (Inherited from BaseModel.)
Public methodToString
Returns a string that represents the current object.
(Inherited from BaseModel.)
Public methodUpdateModels
This method will update this model and all its child models.
(Inherited from BaseModel.)
Top
Remarks

The Target of the DataCondition may refer to any property or element in the simulation.

Examples
This DataCondition will return true if the parent Element's active state contains On:
XML
<Conditions>
  <DataCondition Target="{Binding ActiveStates}" Comparison="Contains" Value="On" />
</Conditions>
This DataCondition example will return true if Param_Temp on the HeatPlate Element has a value above 50.
XML
<Conditions>
  <DataCondition Target="{Binding Parameters.Param_Temp.Value, ElementId=HeatPlate}" Comparison="GreaterThan" Value="50" />
</Conditions>
See Also