Artemis Artemis
Artemis Artemis

Search Results for

    Class DataModelEvent

    Represents a data model event without event arguments

    Inheritance
    object
    DataModelEvent
    Implements
    IDataModelEvent
    Namespace: Artemis.Core
    Assembly: Artemis.Core.dll
    Syntax
    public class DataModelEvent : IDataModelEvent

    Constructors

    DataModelEvent()

    Creates a new instance of the DataModelEvent class with history tracking disabled

    Declaration
    public DataModelEvent()

    DataModelEvent(bool)

    Creates a new instance of the DataModelEvent

    Declaration
    public DataModelEvent(bool trackHistory)
    Parameters
    Type Name Description
    bool trackHistory

    A boolean indicating whether the last 20 events should be tracked

    Properties

    ArgumentsType

    Gets the type of arguments this event contains

    Declaration
    [DataModelIgnore]
    public Type ArgumentsType { get; }
    Property Value
    Type Description
    Type

    EventArgumentsHistory

    Gets a queue of the last 20 event arguments

    Always empty if TrackHistory is false

    Declaration
    [DataModelProperty(Description = "The arguments of the last time this event triggered")]
    public Queue<DataModelEventArgs> EventArgumentsHistory { get; }
    Property Value
    Type Description
    Queue<DataModelEventArgs>

    EventArgumentsHistoryUntyped

    Gets a list of the last 20 event arguments by their base type.

    Always empty if TrackHistory is false

    Declaration
    [DataModelIgnore]
    public List<DataModelEventArgs> EventArgumentsHistoryUntyped { get; }
    Property Value
    Type Description
    List<DataModelEventArgs>

    LastEventArgumentsUntyped

    Gets the event arguments of the last time the event was triggered by its base type

    Declaration
    [DataModelIgnore]
    public DataModelEventArgs? LastEventArgumentsUntyped { get; }
    Property Value
    Type Description
    DataModelEventArgs

    LastTrigger

    Gets the last time the event was triggered

    Declaration
    [DataModelProperty(Name = "Last trigger", Description = "The time at which the event last triggered")]
    public DateTime LastTrigger { get; }
    Property Value
    Type Description
    DateTime

    LastTriggerArguments

    Gets the event arguments of the last time the event was triggered

    Declaration
    [DataModelProperty(Description = "The arguments of the last time this event triggered")]
    public DataModelEventArgs? LastTriggerArguments { get; }
    Property Value
    Type Description
    DataModelEventArgs

    TimeSinceLastTrigger

    Gets the time that has passed since the last trigger

    Declaration
    [DataModelProperty(Name = "Time since trigger", Description = "The time that has passed since the last trigger")]
    public TimeSpan TimeSinceLastTrigger { get; }
    Property Value
    Type Description
    TimeSpan

    TrackHistory

    Gets or sets a boolean indicating whether the last 20 events should be tracked

    Note: setting this to false will clear the current history

    Declaration
    [DataModelIgnore]
    public bool TrackHistory { get; set; }
    Property Value
    Type Description
    bool

    TriggerCount

    Gets the amount of times the event was triggered

    Declaration
    [DataModelProperty(Description = "The total amount of times this event has triggered since the module was activated")]
    public int TriggerCount { get; }
    Property Value
    Type Description
    int

    TriggerPastParticiple

    Gets the past participle for this event shown in the UI

    Declaration
    [DataModelIgnore]
    public string TriggerPastParticiple { get; }
    Property Value
    Type Description
    string

    Methods

    Reset()

    Resets the trigger count and history of this data model event

    Declaration
    public void Reset()

    Trigger()

    Trigger the event

    Declaration
    public void Trigger()

    Update()

    Updates the event, not required for standard events but included in case your custom event needs to update every tick

    Declaration
    public void Update()

    Events

    EventTriggered

    Fires when the event is triggered

    Declaration
    public event EventHandler? EventTriggered
    Event Type
    Type Description
    EventHandler

    Implements

    IDataModelEvent
    Content is available under the PolyForm Noncommercial License, by Artemis RGB.