public void Del(ViAsynLoader loader) { foreach (ViAsynLoader iterLoader in _list) { if (iterLoader == loader) { loader.Detach(); _list.Remove(iterLoader); break; } } }
public static void ClearAll() { _list.BeginIterator(); while (!_list.IsEnd()) { ViRefNode2 <ViAsynLoader> node = _list.CurrentNode; ViAsynLoader loader = node.Data; ViDebuger.AssertError <ViAsynLoader>(loader, "ViAsynLoader.ClearAll() loader is null"); _list.Next(); loader.Detach(); } _list.Clear(); }
//+------------------------------------------------------------------------------------------------------------------------------------------------------------- public static void UpdateAll() { _list.BeginIterator(); while (!_list.IsEnd()) { ViRefNode2 <ViAsynLoader> node = _list.CurrentNode; ViAsynLoader loader = node.Data; ViDebuger.AssertError <ViAsynLoader>(loader, "ViAsynLoader.UpdateAll() loader is null"); _list.Next(); loader.TryLoad(); if (loader.IsLoaded) { OnCompleted dele = loader.DeleOnCompleted; loader.Detach(); loader.OnLoaded(); if (dele != null) { dele(loader); } } } }