Exemple #1
0
/// <summary>
/// Deserialize dictionary
/// </summary>
/// <param name="serializedVersion"></param>
/// <param name="dex"></param>

        public static void Deserialize(string serializedVersion, DictionaryMx dex)
        {
            dex.Initialize();
            DictionaryMx dex2 = Deserialize(serializedVersion);

            foreach (string word in dex2.Words)
            {
                dex.Add(word, dex2.LookupDefinition(word));
            }

            return;
        }
Exemple #2
0
/// <summary>
/// Deserialize dictionary
/// </summary>
/// <param name="serializedVersion"></param>
/// <returns></returns>

        public static DictionaryMx Deserialize(string serializedVersion)
        {
            DictionaryMx dex = new DictionaryMx();

            dex.Initialize();
            string[] sa = serializedVersion.Split('\t');
            dex.Name = sa[0];
            dex.Sql  = sa[1];

            for (int i = 2; i + 1 < sa.Length; i += 2)
            {
                dex.Add(sa[i], sa[i + 1]);
            }

            return(dex);
        }