Ejemplo n.º 1
0
        public static void AddAltLexicon(byte[] b)
        {
            SpreadSheet xls = new SpreadSheet(b);

            while (xls.HasNextRow())
            {
                xls.NextRow();
                string key   = xls.GetNextCellString();
                string value = xls.GetNextCellString();
                if (key.IsEmpty())
                {
                    continue;
                }
                invAltMap[value] = key;
                if (!conflict.Contains(key))
                {
                    if (altMap.ContainsKey(key))
                    {
                        conflict.Add(key);
                    }
                    else
                    {
                        altMap[key] = value;
                    }
                }
            }
            if (log.IsLoggable(LogLevel.Log))
            {
                log.Debug("Duplicate Message Key: {0}", conflict.Join(","));
            }
        }