Apply() публичный Метод

public Apply ( string s, string searchFor ) : string
s string
searchFor string
Результат string
        public string Apply(string s, string searchFor)
        {
            var afterBasicPolicies = basicPolicies
                                     .Where(p => p.IsApplicable())
                                     .Aggregate(s, (acc, curr) => curr.Apply(acc));

            return(replaceComputedValuePolicy.IsApplicable() ?
                   replaceComputedValuePolicy.Apply(afterBasicPolicies, searchFor) :
                   afterBasicPolicies);
        }
        public string Apply(string s, string searchFor)
        {
            var afterBasicPolicies = s;

            foreach (var policy in basicPolicies)
            {
                if (policy.IsApplicable())
                {
                    afterBasicPolicies = policy.Apply(afterBasicPolicies);
                }
            }

            return(replaceComputedValuePolicy.IsApplicable() ?
                   replaceComputedValuePolicy.Apply(afterBasicPolicies, searchFor) :
                   afterBasicPolicies);
        }