修改 主程序下的Comm文件夹 转到 Frameork中

This commit is contained in:
chfei committed 2026-10-17 18:16:55 +08:00
1 parent 2f9c98b105
commit 1eb5315261
78 files changed
+274 -227

No files matched your search

@@ -0,0 +1,34 @@
using System.Collections.Generic;
using System.Linq;
namespace WxOrder.Framework.Commons.pinyin
{
public abstract class PinyinDict : IPinyinDict
{
public abstract Dictionary<string, string[]> Mapping();
public string[] ToPinyin(string word)
{
var mappingResult = Mapping();
if (mappingResult == null)
{
return null;
}
if (mappingResult.TryGetValue(word, out var result))
{
return result;
}
return null;
}
public List<string> Words()
{
var mappingResult = Mapping();
if (mappingResult == null)
{
return null;
}
return mappingResult.Keys.Select(key => key).ToList();
}
}
}