// ICorDebugEnum public static IEnumerable <ICorDebugFrame> GetEnumerator(this ICorDebugFrameEnum corEnum) { corEnum.Reset(); while (true) { ICorDebugFrame[] corFrames = new ICorDebugFrame[EnumerateBufferSize]; uint fetched = corEnum.Next(EnumerateBufferSize, corFrames); if (fetched == 0) { yield break; } for (int i = 0; i < fetched; i++) { yield return(corFrames[i]); } } }
public void Reset() { m_enum.Reset(); m_frame = null; }