private static string ApplyVariables()

in tool/TeamCity.Docker/ContentParser.cs [84:97]


        private static string ApplyVariables([NotNull] string text, [NotNull] IEnumerable<Variable> vars)
        {
            if (text == null)
            {
                throw new ArgumentNullException(nameof(text));
            }

            if (vars == null)
            {
                throw new ArgumentNullException(nameof(vars));
            }

            return vars.Aggregate(text, (current, value) => current.Replace("${" + value.Name + "}", value.Value));
        }