private TextMatchInfo IsMatch(string str, PatternText text, Module module)
        {

                var encoding = Encodings.FirstOrDefault(patternEncoding => patternEncoding.Name == text.Encoding);
                var encodingInfo = encoding.Encode(str, text.Text, module.Resources);
                if (encoding != null && encodingInfo.Result)
                    return new TextMatchInfo(true, text, encodingInfo.EncodeData);
            return new TextMatchInfo(false, null, null);
        }
 public MatchedPatternInfo(TextMatchInfo textMatchInfo, Module module, Pattern pattern)
 {
     TextMatchInfo = textMatchInfo;
     Module = module;
     Pattern = pattern;
 }