Esempio n. 1
0
        public void Initialize()
        {
            _dict = new Dictionary <string, string>();
            //Extend:Load xml and make dict.
            var s = _locator.GetStream(string.Format(DICTIONARY, _cInfo.Name));

            if (s != null)
            {
                using (s)
                {
                    var doc     = XDoc.LoadFromStream(s);
                    var entries = doc.NavigateToList("/translate/entry");
                    foreach (var entry in entries)
                    {
                        _dict[entry.GetStringValue("@key")] = entry.GetStringValue("@value");
                    }
                }
            }
        }