public bool Poll(uint BitsToMatch, EventFlagWaitTypeSet WaitType, uint* OutBits)
{
if (OutBits != null)
{
*OutBits = Info.CurrentPattern;
}
if (
(WaitType.HasFlag(EventFlagWaitTypeSet.Or))
? ((Info.CurrentPattern & BitsToMatch) != 0) // one or more bits of the mask
: ((Info.CurrentPattern & BitsToMatch) == BitsToMatch)) // all the bits of the mask
{
_DoClear(WaitType, BitsToMatch);
return true;
}
return false;
}