Пример #1
0
        public static string DoTransform(string text, MTransformItem item)
        {
            var reg         = new Regex(item.Extractor);
            var replacement = item.Replacement;
            var s           = text;

            if (replacement.StartsWith("<extract>"))
            {
                replacement = replacement.Substring("<extract>".Length);
                s           = string.Join("", reg.Matches(s).Cast <Match>().Select(m => m.Groups[0]));
            }
            replacement = replacement.Replace(escapes);
            s           = reg.Replace(s, replacement);
            return(s);
        }
Пример #2
0
 public void Delete(MTransformItem item)
 {
     TransformItems.Remove(item);
     Reindex();
 }
Пример #3
0
 public void Add(MTransformItem item)
 {
     TransformItems.Add(item);
     Reindex();
 }
Пример #4
0
 public TransformItemEditViewModel(MTransformItem item)
 {
     this.item = item;
     item.CopyProperties(ItemEdit);
 }