Search Results for

    Show / Hide Table of Contents

    Class Trigger

    A class that represents a trigger that can be either executed before a save operation occurs or afterwards.

    Inheritance
    System.Object
    DynamicObject
    NamedDynamicObject
    ModelElement
    Trigger
    Implements
    System.Dynamic.IDynamicMetaObjectProvider
    System.ComponentModel.INotifyPropertyChanged
    System.ComponentModel.IDataErrorInfo
    Inherited Members
    ModelElement.IsValidIdentifier(String)
    ModelElement.OnDeserializing(StreamingContext)
    ModelElement.Attach(ModelElement)
    ModelElement.Detach()
    ModelElement.Validate(IList<PropertyValidationMessage>, Boolean)
    ModelElement.SetOwnershipPrefix(String)
    ModelElement.UpdateChildren(NotifyCollectionChangedEventArgs)
    ModelElement.SetPersistBehavior(PersistBehavior)
    ModelElement.SetName(String)
    ModelElement.SetOwnership(Ownership)
    ModelElement.ElementGuid
    ModelElement.Name
    ModelElement.Parent
    ModelElement.Children
    ModelElement.PersistBehavior
    ModelElement.IsFullPersistBehavior
    ModelElement.IsNonePersistBehavior
    ModelElement.IsSystemElement
    ModelElement.IsApplicationSpecificElement
    ModelElement.IsUserElement
    ModelElement.IsSystemOrApplicationSpecificElement
    ModelElement.InvariantFriendlyName
    ModelElement.CreationVersion
    ModelElement.LastUpdateVersion
    ModelElement.Error
    ModelElement.ErrorSummary
    ModelElement.IsValid
    ModelElement.Ownership
    ModelElement.OwnershipPrefix
    ModelElement.NonPrefixedName
    NamedDynamicObject.OnPropertyChanged(String)
    NamedDynamicObject.PropertyChanged
    DynamicObject.GetMember(String)
    DynamicObject.SetMember(String, Object)
    DynamicObject.GetMetaObject(Expression)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.DataModel.Triggers
    Assembly: TimeCockpit.Data.dll
    Syntax
    public class Trigger : ModelElement, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo

    Constructors

    Trigger()

    Initializes a new instance of the Trigger class.

    Declaration
    public Trigger()

    Trigger(IEnumerable<KeyValuePair<Object, Object>>)

    Initializes a new instance of the Trigger class.

    Declaration
    public Trigger(IEnumerable<KeyValuePair<object, object>> properties)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object, System.Object>> properties

    Collection of properties.

    Trigger(Trigger)

    Initializes a new instance of the Trigger class.

    Declaration
    public Trigger(Trigger element)
    Parameters
    Type Name Description
    Trigger element

    The trigger to copy.

    Remarks

    This copy constructor creates copies of all value-typed properties.

    Properties

    Binding

    Gets or sets the assembly binding.

    Declaration
    public ModelActionBinding Binding { get; set; }
    Property Value
    Type Description
    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.

    Declaration
    public TriggerExecutionMode ExecutionMode { get; set; }
    Property Value
    Type Description
    TriggerExecutionMode

    ExecutionTime

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

    Declaration
    public TriggerExecutionTime ExecutionTime { get; set; }
    Property Value
    Type Description
    TriggerExecutionTime

    IsDisabled

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

    Declaration
    public bool IsDisabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is disabled; otherwise, false.

    TriggerType

    Gets or sets the type of the trigger.

    Declaration
    public TriggerType TriggerType { get; set; }
    Property Value
    Type Description
    TriggerType

    UseTransaction

    Gets or sets a value indicating whether a transaction should be used for the trigger or not.

    Declaration
    public bool UseTransaction { get; set; }
    Property Value
    Type Description
    System.Boolean

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

    Methods

    Accept(ModelElementVisitor)

    Dispatches the visit handler for a trigger.

    Declaration
    public override void Accept(ModelElementVisitor visitor)
    Parameters
    Type Name Description
    ModelElementVisitor visitor

    the trigger visitor.

    Overrides
    ModelElement.Accept(ModelElementVisitor)

    Execute(ExecutionContext)

    Executes the code the Binding is associated with.

    Declaration
    public void Execute(ExecutionContext executionContext)
    Parameters
    Type Name Description
    ExecutionContext executionContext

    The execution context.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown if it is tried to executed a disabled trigger.

    In This Article
    Back to top Copyright © 2020 software architects gmbh