Class Trigger
- Namespace
- TimeCockpit.Data.DataModel.Triggers
- Assembly
- TimeCockpit.Data.dll
A class that represents a trigger that can be either executed before a save operation occurs or afterwards.
public class Trigger : ModelElement, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo
- Inheritance
-
ObjectTrigger
- Implements
-
IDynamicMetaObjectProviderINotifyPropertyChangedIDataErrorInfo
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
Trigger()
Initializes a new instance of the Trigger class.
public Trigger()
Trigger(IEnumerable<KeyValuePair<Object, Object>>)
Initializes a new instance of the Trigger class.
public Trigger(IEnumerable<KeyValuePair<object, object>> properties)
Parameters
propertiesIEnumerable<KeyValuePair<Object, Object>>Collection of properties.
Trigger(Trigger)
Initializes a new instance of the Trigger class.
public Trigger(Trigger element)
Parameters
elementTriggerThe trigger to copy.
Remarks
This copy constructor creates copies of all value-typed properties.
Properties
Binding
Gets or sets the assembly binding.
public ModelActionBinding Binding { get; set; }
Property Value
Remarks
The instance of Binding holds a references to some piece of executabe .NET code.
ExecutionMode
Gets or sets the execution mode of the trigger.
public TriggerExecutionMode ExecutionMode { get; set; }
Property Value
ExecutionTime
Gets or sets the execution time when the trigger is fired.
public TriggerExecutionTime ExecutionTime { get; set; }
Property Value
IsDisabled
Gets or sets a value indicating whether this instance is disabled.
public bool IsDisabled { get; set; }
Property Value
- Boolean
trueif this instance is disabled; otherwise,false.
TriggerType
Gets or sets the type of the trigger.
public TriggerType TriggerType { get; set; }
Property Value
UseTransaction
Gets or sets a value indicating whether a transaction should be used for the trigger or not.
public bool UseTransaction { get; set; }
Property Value
- Boolean
trueif a transaction should be used; otherwise,false.
Methods
Accept(ModelElementVisitor)
Dispatches the visit handler for a trigger.
public override void Accept(ModelElementVisitor visitor)
Parameters
visitorModelElementVisitorthe trigger visitor.
Execute(ExecutionContext)
Executes the code the Binding is associated with.
public void Execute(ExecutionContext executionContext)
Parameters
executionContextExecutionContextThe execution context.
Exceptions
- System.InvalidOperationException
Thrown if it is tried to executed a disabled trigger.