public override RuleResult Execute()

in src/IdFix/Rules/Dedicated/TargetAddressBlankRule.cs [36:53]


        public override RuleResult Execute(ComposedRule parent, SearchResultEntry entry, string attributeValue)
        {
            string objectType = this.GetObjectType(entry);
            var homeMdb = entry.Attributes[StringLiterals.HomeMdb];

            // When the entry is a contact or user
            if (objectType.Equals("contact", StringComparison.CurrentCultureIgnoreCase) || objectType.Equals("user", StringComparison.CurrentCultureIgnoreCase))
            {
                // and homeMdb is not defined 
                if (homeMdb == null || homeMdb.Count == 0 || homeMdb[0] == null || string.IsNullOrWhiteSpace(homeMdb[0].ToString()))
                {
                    // targetAddress cannot be blank
                    return base.Execute(parent, entry, attributeValue);
                }
            }

            return this.GetSuccessResult();
        }