Beispiel #1
0
            /*---------SAVEABLE DATA---------*/

            public Event(string eventKey) : base($"mSE_{eventKey}")
            {
                EventKey  = eventKey;
                Enabled   = true;
                LastEvent = DateTime.MinValue;

                Load();
            }
Beispiel #2
0
            public void Invoke(object payload = null)
            {
                if (!Enabled)
                {
                    return;
                }

                BeforeEventCounter++;
                if (BeforeInvoke(this, new EventArgs
                {
                    Payload = payload
                }))
                {
                    EventCounter++;
                    LastEvent = DateTime.Now;
                    OnEvent(this, new EventArgs
                    {
                        Payload = payload
                    });
                }
            }