WikiFunctions.ReplaceSpecial.TemplateParamRule.Apply C# (CSharp) Метод

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

public Apply ( TreeNode tn, string text, string title ) : string
tn System.Windows.Forms.TreeNode
text string
title string
Результат string
        public override string Apply(TreeNode tn, string text, string title)
        {
            if (string.IsNullOrEmpty(text))
                return text;

            if (!enabled_)
                return text;

            string pattern = "(\\|[\\s]*)" + ParamName + "([\\s]*=)";

            text = Regex.Replace(text, pattern, "$1" + NewParamName + "$2");

            foreach (TreeNode t in tn.Nodes)
            {
                IRule sr = (IRule)t.Tag;
                text = sr.Apply(t, text, title);
            }

            return text;
        }