/// <summary> /// Creates a new instance of <see cref="TargetAddressBlankRule"/> /// </summary> public TargetAddressBlankRule() : base((entry, value) => { var objectType = ComposedRule.GetObjectType(entry); // the orginal code doesn't provide a fix if the type isn't "contact" if (objectType.Equals("contact", StringComparison.CurrentCultureIgnoreCase)) { value = "SMTP:" + entry.Attributes[StringLiterals.Mail][0].ToString(); return(value.Length > 256 ? value.Substring(0, 256) : value); } return(value); }) { }