public virtual bool CompareSingleValue(PropTag tag, Restriction.RelOp op, object x, object y)
 {
     if (x == null)
     {
         return(y == null);
     }
     if (y == null)
     {
         return(false);
     }
     if (!RestrictionEvaluator.IsSupportedOperation(op))
     {
         throw new InvalidRuleException(string.Format("Operation {0} is not supported", op));
     }
     if (x.GetType() != y.GetType() && (!(x.GetType() == typeof(ExDateTime)) || !(y.GetType() == typeof(DateTime))))
     {
         throw new InvalidRuleException(string.Format("Can not compare values of type {0} and type {1}", x.GetType(), y.GetType()));
     }
     if (op == Restriction.RelOp.MemberOfDL)
     {
         byte[] array = x as byte[];
         if (array == null)
         {
             this.TraceDebug("CompareSingleValue: MemberOf, recipientEntryId is not a byte array.");
             this.RecordError(ServerStrings.FolderRuleErrorInvalidRecipientEntryId);
             return(false);
         }
         byte[] array2 = y as byte[];
         if (array2 == null)
         {
             this.TraceDebug("CompareSingleValue: MemberOf, groupEntryId is not a byte array, marking rule in error.");
             throw new InvalidRuleException(ServerStrings.FolderRuleErrorInvalidGroup(y.GetType().Name));
         }
         return(RuleUtil.IsMemberOf(this, array, array2));
     }
     else
     {
         int?num = RestrictionEvaluator.CompareValue(this.CultureInfo, tag, x, y);
         if (num == null)
         {
             throw new InvalidRuleException(string.Format("Can't compare value '{0}' and '{1}'", x, y));
         }
         return(RestrictionEvaluator.GetOperationResultFromOrder(op, num.Value));
     }
 }