private static PredicateCondition FindPredicateConditionByName(Condition root, string name)
        {
            if (root == null)
            {
                return(null);
            }
            ConditionType conditionType = root.ConditionType;

            if (conditionType != ConditionType.And)
            {
                switch (conditionType)
                {
                case ConditionType.True:
                    return(null);

                case ConditionType.Predicate:
                {
                    PredicateCondition predicateCondition = (PredicateCondition)root;
                    if (string.Equals(predicateCondition.Name, name, StringComparison.Ordinal))
                    {
                        return(predicateCondition);
                    }
                    return(null);
                }
                }
                return(null);
            }
            AndCondition andCondition = (AndCondition)root;

            foreach (Condition root2 in andCondition.SubConditions)
            {
                PredicateCondition predicateCondition2 = OutlookProtectionRule.FindPredicateConditionByName(root2, name);
                if (predicateCondition2 != null)
                {
                    return(predicateCondition2);
                }
            }
            return(null);
        }
 private PredicateCondition FindPredicateConditionByName(string name)
 {
     return(OutlookProtectionRule.FindPredicateConditionByName(base.Condition, name));
 }