protected virtual string TransformText(string str, ScenarioContext context)
        {
            if (string.IsNullOrEmpty(str))
            {
                return(str);
            }

            var match = PatternMatch.Parse(str);

            return(match == null ? str
                : TransformText(match.ReplaceMatched(TransformPattern(match.MatchedPattern, context)), context));
        }