Ejemplo n.º 1
0
        public static void execute(LogicExecutor executor)
        {
            executor(_instance);

            LogicUpdateHandler[] hArr = new LogicUpdateHandler[_updateHandlers.Count];
            _updateHandlers.CopyTo(hArr);
            foreach (var handler in hArr)
            {
                App.Current.Dispatcher.Invoke(() =>
                {
                    handler(_instance);
                });
            }
        }
Ejemplo n.º 2
0
 public static void removeHandler(LogicUpdateHandler handler)
 {
     _updateHandlers.Remove(handler);
 }
Ejemplo n.º 3
0
 public static void onLogicUpdate(LogicUpdateHandler handler)
 {
     _updateHandlers.Add(handler);
 }