Пример #1
0
 public static void WaitAll(
     NoNamedEvent[] waiters,
     int millisecondTimeout
     )
 {
     throw new NotSupportedException("WindowsCE does not support waiting for ALL events but only for ANY event of the given set. For details please refer https://msdn.microsoft.com/en-us/library/aa450987.aspx");
 }
Пример #2
0
 public static int WaitAny(NoNamedEvent[] waiters)
 {
     return
         WaitAny(
             waiters,
             -1
             );
 }
Пример #3
0
        private static IntPtr[] GetHandleArray(NoNamedEvent[] waiters)
        {
            var handlers = new IntPtr[waiters.Length];

            for (var i = 0; i < waiters.Length; i++)
            {
                handlers[i] = waiters[i].Handle;
            }

            return handlers;
        }
Пример #4
0
        public static int WaitAny(
            NoNamedEvent[] waiters,
            int millisecondTimeout
            )
        {
            if (waiters == null)
            {
                throw new ArgumentNullException("waiters");
            }
            if (waiters.Length == 0)
            {
                throw new ArgumentException("waiters.Length == 0");
            }

            var handlers = GetHandleArray(waiters);

            var index = WaitAnyHandler(millisecondTimeout, handlers);

            return index;
        }
Пример #5
0
 public static void WaitAll(NoNamedEvent[] waiters)
 {
     WaitAll(waiters, -1);
 }