Exemplo n.º 1
0
        public static DebugEventInfo[] GetDebugEvents(bool getPreviousFrameData)
        {
            UInt32 maxEventCount = GetDebugEventCount(getPreviousFrameData);

            DebugEventInfo[] debugEvents = new DebugEventInfo[maxEventCount];

            DebugApi.GetDebugEventsWrapper(debugEvents, ref maxEventCount, getPreviousFrameData);
            if (maxEventCount < debugEvents.Length)
            {
                //Remove the excess from the array if needed
                Array.Resize(ref debugEvents, (int)maxEventCount);
            }

            return(debugEvents);
        }
Exemplo n.º 2
0
        public static DebugEventInfo[] GetDebugEvents(EventViewerDisplayOptions options)
        {
            UInt32 maxEventCount = GetDebugEventCount(options);

            DebugEventInfo[] debugEvents = new DebugEventInfo[maxEventCount];

            DebugApi.GetDebugEventsWrapper(debugEvents, ref maxEventCount);
            if (maxEventCount < debugEvents.Length)
            {
                //Remove the excess from the array if needed
                Array.Resize(ref debugEvents, (int)maxEventCount);
            }

            return(debugEvents);
        }