force pinyin library static constructor initialize #858

This commit is contained in:
bao-qian
2017-02-12 17:22:56 +00:00
parent 46f98ded10
commit e4e226b2c7

View File

@@ -23,6 +23,8 @@ namespace Wox.Infrastructure
{
_pinyinStorage = new BinaryStorage<ConcurrentDictionary<string, string[][]>>("Pinyin");
PinyinCache = _pinyinStorage.TryLoad(new ConcurrentDictionary<string, string[][]>());
// force pinyin library static constructor initialize
PinyinHelper.toHanyuPinyinStringArray('T', Format);
});
Log.Info($"|Wox.Infrastructure.Alphabet.Initialize|Number of preload pinyin combination<{PinyinCache.Count}>");
}