Example #1
0
        private void AddToDictionaryHelper(string key, string value, string context)
        {
            var e = dictionary.GetEntry(key);

            e.Text = value;
            var ctx = new List <string>();

            if (!string.IsNullOrWhiteSpace(e.Context))
            {
                ctx = e.Context.Split('\n').ToList();
            }
            if (!ctx.Contains(context))
            {
                ctx.Add(context);
            }
            e.Context = string.Join("\n", ctx);
        }