bool CheckRequiredElements(BitFlagsGenerator expectedElements, byte [] requiredElements)
 {
     for (int i = 0; i < requiredElements.Length; i++)
     {
         if ((expectedElements.GetLocal(i) & requiredElements[i]) != 0)
         {
             return(false);
         }
     }
     return(true);
 }
Пример #2
0
 private void CheckRequiredElements(BitFlagsGenerator expectedElements, byte[] requiredElements, Label throwMissingRequiredMembersLabel)
 {
     for (int i = 0; i < requiredElements.Length; i++)
     {
         _ilg.Load(expectedElements.GetLocal(i));
         _ilg.Load(requiredElements[i]);
         _ilg.And();
         _ilg.Load(0);
         _ilg.Ceq();
         _ilg.Brfalse(throwMissingRequiredMembersLabel);
     }
 }
 void CheckRequiredElements(BitFlagsGenerator expectedElements, byte[] requiredElements, Label throwMissingRequiredMembersLabel)
 {
     for (int i = 0; i < requiredElements.Length; i++)
     {
         ilg.Load(expectedElements.GetLocal(i));
         ilg.Load(requiredElements[i]);
         ilg.And();
         ilg.Load(0);
         ilg.Ceq();
         ilg.Brfalse(throwMissingRequiredMembersLabel);
     }
 }
		bool CheckRequiredElements (BitFlagsGenerator expectedElements, byte [] requiredElements)
		{
			for (int i = 0; i < requiredElements.Length; i++)
				if ((expectedElements.GetLocal(i) & requiredElements[i]) != 0)
					return false;
			return true;
		}