EventLoop.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
            public static void Run()
            {
                MSG msg;
 
                while (true)
                {
       
                    if (PeekMessage(out msg, IntPtr.Zero, 0, 0, PM_REMOVE))
                    {
                        if (msg.Message == WM_QUIT)
                            break;
                        TranslateMessage(ref msg);
                        DispatchMessage(ref msg);
                    }
                }
            }
            [StructLayout(LayoutKind.Sequential)]

Usage Example

Example #1
0
        public void EventLoopRuns()
        {
            var i = 0;

            EventLoop.Run(() => { i++; });
            Assert.Equal(1, i);
        }
All Usage Examples Of EventLoop::Run