Example #1
0
 protected FieldTags()
 {
     SimpleTags = GetSimpleTags();
     SimpleTags.AddForward("[ENDN]", String.Empty);
     SimpleTags.AddBackward("\r\n", "\n");
     SimpleTags.AddBackward("\r", "\n");
     SimpleTags.Commit();
 }
Example #2
0
        private static IList <KeyValuePair <String, TextReplacement> > ReadTagReplacements(String inputPath)
        {
            if (!File.Exists(inputPath))
            {
                return(new List <KeyValuePair <String, TextReplacement> >());
            }

            TxtEntry[] generalNames = TxtReader.ReadStrings(inputPath);
            if (generalNames.IsNullOrEmpty())
            {
                return(new List <KeyValuePair <String, TextReplacement> >());
            }

            TextReplacements result = new TextReplacements(generalNames.Length);

            foreach (TxtEntry entry in generalNames)
            {
                result.Add(entry.Prefix, entry.Value);
            }

            return(result.Forward);
        }