static public void Process() { DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance(); ColObserver pNode = pDelayMan.head; while (pNode != null) { // Fire off listener pNode.Execute(); pNode = (ColObserver)pNode.pNext; } // remove pNode = pDelayMan.head; ColObserver pTmp = null; while (pNode != null) { pTmp = pNode; pNode = (ColObserver)pNode.pNext; // remove pDelayMan.PrivDetach(pTmp, ref pDelayMan.head); } }
static public void Process() { DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance(); ColObserver pNode = pDelayMan.head; while (pNode != null) { pNode.Execute(); pNode = (ColObserver)pNode.pNext; } pNode = pDelayMan.head; ColObserver pTemp = null; while (pNode != null) { pTemp = pNode; pNode = (ColObserver)pNode.pNext; //this might have been my issue with my timermanager references pDelayMan.PrivDetach(pTemp, ref pDelayMan.head); } }
public static void SetActive(DelayedObjectMan pSBMan) { DelayedObjectMan pMan = DelayedObjectMan.PrivGetInstance(); Debug.Assert(pMan != null); Debug.Assert(pSBMan != null); DelayedObjectMan.pActiveDOMan = pSBMan; }
static public void Attach(ColObserver observer) { // protection Debug.Assert(observer != null); DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance(); // add to front if (pDelayMan.head == null) { pDelayMan.head = observer; observer.pNext = null; observer.pPrev = null; } else { observer.pNext = pDelayMan.head; observer.pPrev = null; pDelayMan.head.pPrev = observer; pDelayMan.head = observer; } }
//Constructor is towards the bottom of the class body static public void Attach(ColObserver observer) { Debug.Assert(observer != null); DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance(); //adding to the front //first time if (pDelayMan.head == null) { pDelayMan.head = observer; observer.pNext = null; observer.pPrev = null; } //every other time else { observer.pNext = pDelayMan.head; observer.pPrev = null; pDelayMan.head.pPrev = observer; pDelayMan.head = observer; } }
public static void Reset() { DelayedObjectMan pDelayMan = DelayedObjectMan.PrivGetInstance(); pDelayMan.head = null; }