protected static Restriction CreateOneOrTwoTimesRestrictions(ExDateTime?before, ExDateTime?after) { Restriction[] array = null; if (before != null && after != null) { array = new Restriction[2]; } if (before != null) { Restriction restriction = Condition.CreateDateTimePropertyRestriction(PropTag.MessageDeliveryTime, before.Value, Restriction.RelOp.LessThan); if (after == null) { return(restriction); } array[0] = restriction; } if (after != null) { Restriction restriction2 = Condition.CreateDateTimePropertyRestriction(PropTag.MessageDeliveryTime, after.Value, Restriction.RelOp.GreaterThan); if (before == null) { return(restriction2); } array[1] = restriction2; } return(Restriction.And(array)); }