public static void Add(IQueueAction action) { _actionQueue.Enqueue(action); if (_actionQueue.Count == 1) { // first one added, schedule a layout! #if XAMMAC1 NSApplication.SharedApplication.BeginInvokeOnMainThread(new NSAction(FlushQueue)); #else NSApplication.SharedApplication.BeginInvokeOnMainThread(FlushQueue); #endif } }
public static void Add(IQueueAction action, object key) { if (key != null) { if (_items.Contains(key)) { return; } _items.Add(key); } Add(new SingleQueueAction { Inner = action, Key = key }); }