private static void AddMapping(MessageDictionary dictionary, string mapping)
        {
            var elems = mapping.Split(' ');
            var mode = GetMode(elems.First());

            var mapCount = (elems.Count() - 1)/2;
            Enumerable.Range(0, mapCount).Do(i =>
                                                 {
                                                     var mappings = elems.Skip(i*2 + 1).Take(2);
                                                     dictionary.AddString(mode, mappings.First(), GetModeChangeMessage(mappings.Skip(1).First()));
                                                 });
        }
Esempio n. 2
0
 public override void AddToDictionary(MessageDictionary dictionary, MethodInfo info)
 {
     dictionary.AddString(_mode, _keyList, BuildMessage(info));
 }