Example #1
0
        public void CallNotifyVM(ConveyorBasicInfo cbi)
        {
            List <Action <ConveyorBasicInfo> > notActive = new List <Action <ConveyorBasicInfo> >();

            for (int i = 0; i < NotifyVM.Count; i++)
            {
                try
                {
                    NotifyVM[i].Invoke(cbi); // , null, null);
                }
                catch (Exception)
                {
                    notActive.Add(NotifyVM[i]);
                }
            }
            notActive.ForEach(p => NotifyVM.Remove(p));
        }
Example #2
0
        public void CallNotifyVM(ConveyorBasicInfo cbi)
        {
            List <Action <ConveyorBasicInfo> > notActive = new List <Action <ConveyorBasicInfo> >();

            for (int i = 0; i < NotifyVM.Count; i++)
            {
                try
                {
                    NotifyVM[i].Invoke(cbi); // , null, null);
                }
                catch (Exception ex)
                {
                    Warehouse.AddEvent(Event.EnumSeverity.Error, Event.EnumType.Exception, $"{Name}.CallNotifyVM failed : {ex.Message}");
                    notActive.Add(NotifyVM[i]);
                }
            }
            notActive.ForEach(p => NotifyVM.Remove(p));
        }