protected void SetNotify(int count) { TempData["Notify"] = new NotifyVM() { CountOrders = count }; }
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)); }
public static void Send(string key, NotifyVM value) { Messaging.Send(key, value); }
public static void Send(NotifyVM value) { Messaging.Send(GetNotifyKey(), value); }