Table of Contents

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
Object
Trigger
Implements
IDynamicMetaObjectProvider
INotifyPropertyChanged
IDataErrorInfo
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

properties IEnumerable<KeyValuePair<Object, Object>>

Collection of properties.

Trigger(Trigger)

Initializes a new instance of the Trigger class.

public Trigger(Trigger element)

Parameters

element Trigger

The 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

ModelActionBinding

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

TriggerExecutionMode

ExecutionTime

Gets or sets the execution time when the trigger is fired.

public TriggerExecutionTime ExecutionTime { get; set; }

Property Value

TriggerExecutionTime

IsDisabled

Gets or sets a value indicating whether this instance is disabled.

public bool IsDisabled { get; set; }

Property Value

Boolean

true if this instance is disabled; otherwise, false.

TriggerType

Gets or sets the type of the trigger.

public TriggerType TriggerType { get; set; }

Property Value

TriggerType

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

true if a transaction should be used; otherwise, false.

Methods

Accept(ModelElementVisitor)

Dispatches the visit handler for a trigger.

public override void Accept(ModelElementVisitor visitor)

Parameters

visitor ModelElementVisitor

the trigger visitor.

Execute(ExecutionContext)

Executes the code the Binding is associated with.

public void Execute(ExecutionContext executionContext)

Parameters

executionContext ExecutionContext

The execution context.

Exceptions

System.InvalidOperationException

Thrown if it is tried to executed a disabled trigger.