Beispiel #1
0
        }         // proc Dispose

        #endregion

        #region -- ExecuteLoop ------------------------------------------------------------

        public void ExecuteEvent(DEServerEvent eventType)
        {
            lock (actions)
            {
                var eventActions = actions.OfType <EventItem>().Where(c => c.EventType == eventType).ToArray();
                foreach (var action in eventActions)
                {
                    try
                    {
                        action.Execute();
                    }
                    catch (Exception e)
                    {
                        Log.Except(e);
                    }
                }
            }
        }         // proc Shutdown
Beispiel #2
0
 void IDEServerQueue.RegisterEvent(Action action, DEServerEvent eventType)
 => InsertAction(new EventItem(GetNextId(), action, eventType));
Beispiel #3
0
 public EventItem(int id, Action action, DEServerEvent eventType)
     : base(id, action)
 {
     this.EventType = eventType;
 }             // ctor