Click or drag to resize

CompositeConditionModel Class

The CompositeCondition condition returns true when all or one of the child Conditions are true.
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 CompositeConditionModel : ConditionModel

The CompositeConditionModel type exposes the following members.

Constructors
  NameDescription
Public methodCompositeConditionModel
Initializes a new instance of the CompositeConditionModel 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 propertyConditions
Public propertyConditionsSerialized
Lists the child Conditions of this CompositeCondition.
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 propertyMatch
Defines if any or all of the child Conditions need to be true for the CompositeCondition to return true.
Public propertyTemplateVersionId
Contains a id of source template.
(Inherited from BaseModel.)
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

A CompositeCondition can be nested inside another CompositeCondition as needed.

Examples

This example contains a nested CompositeCondition. The child CompositeCondition returns true if both its child DataConditions are true.

The parent CompositeCondition will return true if either the child DataCondition or CompositeCondition are true:

XML
<CompletedWhen>
  <CompositeCondition Match="Any">
     <DataCondition Target="LeftHand" Property="ActiveStates" Comparison="Contains" Value="Glove" />
     <CompositeCondition Match="All">
      <DataCondition Target="LabRoom" Property="IsFocused" Value="true" />
      <DataCondition Target="RightHand" Property="ActiveStates" Comparison="Contains" Value="Glove" />
     </CompositeCondition>
  </CompositeCondition>
</CompletedWhen>
See Also