public override bool IsTarget(TargetUser user) { if (!user.ContainsKey(Property)) { return(false); } var value = user[Property]; return(ValuesList.Apply(value, Option)); }
public override bool IsTarget(TargetUser user) { if (Percent.Number == 0) { return(false); } var hashId = Security.CreateMD5(user["id"] + UserTargeting.EnvironmentId.ToString()).ToLower(); int value = int.Parse(hashId[0].ToString(), System.Globalization.NumberStyles.HexNumber); var number = (Percent.Number / 100.0) * 16; return(value <= number); }
public abstract bool IsTarget(TargetUser user);