diff --git a/Sanhe.Abp.Framework.sln b/Sanhe.Abp.Framework.sln index 7e141d0..2525b30 100644 --- a/Sanhe.Abp.Framework.sln +++ b/Sanhe.Abp.Framework.sln @@ -55,9 +55,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sanhe.Abp.LocalizationManag EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sanhe.Abp.LocalizationManagement.HttpApi", "modules\localization-management\Sanhe.Abp.LocalizationManagement.HttpApi\Sanhe.Abp.LocalizationManagement.HttpApi.csproj", "{50B3735E-750E-483F-9A9B-F4CAE1657390}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sanhe.Abp.Hangfire.Dashboard", "modules\common\Sanhe.Abp.Hangfire.Dashboard\Sanhe.Abp.Hangfire.Dashboard.csproj", "{E6EF4C8A-2086-48FB-BAAD-899A66D954CB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sanhe.Abp.Hangfire.Dashboard", "modules\common\Sanhe.Abp.Hangfire.Dashboard\Sanhe.Abp.Hangfire.Dashboard.csproj", "{E6EF4C8A-2086-48FB-BAAD-899A66D954CB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sanhe.Abp.Hangfire.Storage.PostgreSql", "modules\common\Sanhe.Abp.Hangfire.Storage.PostgreSql\Sanhe.Abp.Hangfire.Storage.PostgreSql.csproj", "{278CB228-3993-4F84-946B-1517887E0183}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sanhe.Abp.Hangfire.Storage.PostgreSql", "modules\common\Sanhe.Abp.Hangfire.Storage.PostgreSql\Sanhe.Abp.Hangfire.Storage.PostgreSql.csproj", "{278CB228-3993-4F84-946B-1517887E0183}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sanhe.Abp.PinyinConverter", "modules\common\Sanhe.Abp.PinyinConverter\Sanhe.Abp.PinyinConverter.csproj", "{60620380-86CD-46DB-B2DA-CFFBCF2423DB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sanhe.Abp.PinyinConverter.ToolGoodWords", "modules\common\Sanhe.Abp.PinyinConverter.ToolGoodWords\Sanhe.Abp.PinyinConverter.ToolGoodWords.csproj", "{EE08FB0C-EDC1-4DEF-B0C8-699F4E7D08AF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -133,6 +137,14 @@ Global {278CB228-3993-4F84-946B-1517887E0183}.Debug|Any CPU.Build.0 = Debug|Any CPU {278CB228-3993-4F84-946B-1517887E0183}.Release|Any CPU.ActiveCfg = Release|Any CPU {278CB228-3993-4F84-946B-1517887E0183}.Release|Any CPU.Build.0 = Release|Any CPU + {60620380-86CD-46DB-B2DA-CFFBCF2423DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60620380-86CD-46DB-B2DA-CFFBCF2423DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60620380-86CD-46DB-B2DA-CFFBCF2423DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60620380-86CD-46DB-B2DA-CFFBCF2423DB}.Release|Any CPU.Build.0 = Release|Any CPU + {EE08FB0C-EDC1-4DEF-B0C8-699F4E7D08AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE08FB0C-EDC1-4DEF-B0C8-699F4E7D08AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE08FB0C-EDC1-4DEF-B0C8-699F4E7D08AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE08FB0C-EDC1-4DEF-B0C8-699F4E7D08AF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -160,6 +172,8 @@ Global {50B3735E-750E-483F-9A9B-F4CAE1657390} = {13AA8858-C832-4AAD-8B7D-C8AF879F39A7} {E6EF4C8A-2086-48FB-BAAD-899A66D954CB} = {2A768109-31B7-4C52-928C-3023DAB9F254} {278CB228-3993-4F84-946B-1517887E0183} = {2A768109-31B7-4C52-928C-3023DAB9F254} + {60620380-86CD-46DB-B2DA-CFFBCF2423DB} = {2A768109-31B7-4C52-928C-3023DAB9F254} + {EE08FB0C-EDC1-4DEF-B0C8-699F4E7D08AF} = {2A768109-31B7-4C52-928C-3023DAB9F254} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AB69BFDE-9DDB-4D16-8CB8-72472C0319CD} diff --git a/modules/common/Sanhe.Abp.Localization.Dynamic/Sanhe.Abp.Localization.Dynamic.csproj b/modules/common/Sanhe.Abp.Localization.Dynamic/Sanhe.Abp.Localization.Dynamic.csproj index 5cc3eed..db77ea4 100644 --- a/modules/common/Sanhe.Abp.Localization.Dynamic/Sanhe.Abp.Localization.Dynamic.csproj +++ b/modules/common/Sanhe.Abp.Localization.Dynamic/Sanhe.Abp.Localization.Dynamic.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/FodyWeavers.xml b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe.Abp.PinyinConverter.ToolGoodWords.csproj b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe.Abp.PinyinConverter.ToolGoodWords.csproj new file mode 100644 index 0000000..07aa1fc --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe.Abp.PinyinConverter.ToolGoodWords.csproj @@ -0,0 +1,19 @@ + + + + + + + netstandard2.0 + + + + + + + + + + + + diff --git a/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe/Abp/PinyinConverter/ToolGoodWords/AbpPinyinConverterToolGoodWordsModule.cs b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe/Abp/PinyinConverter/ToolGoodWords/AbpPinyinConverterToolGoodWordsModule.cs new file mode 100644 index 0000000..29cc327 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe/Abp/PinyinConverter/ToolGoodWords/AbpPinyinConverterToolGoodWordsModule.cs @@ -0,0 +1,14 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Volo.Abp.Modularity; + +namespace Sanhe.Abp.PinyinConverter.ToolGoodWords; + +[DependsOn(typeof(AbpPinyinConverterModule))] +public class AbpPinyinConverterToolGoodWordsModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.Replace(ServiceDescriptor.Singleton()); + } +} diff --git a/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe/Abp/PinyinConverter/ToolGoodWords/ToolGoodWordsPinyinConverter.cs b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe/Abp/PinyinConverter/ToolGoodWords/ToolGoodWordsPinyinConverter.cs new file mode 100644 index 0000000..0b244a8 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter.ToolGoodWords/Sanhe/Abp/PinyinConverter/ToolGoodWords/ToolGoodWordsPinyinConverter.cs @@ -0,0 +1,18 @@ +using ToolGood.Words.Pinyin; +using Volo.Abp.DependencyInjection; + +namespace Sanhe.Abp.PinyinConverter.ToolGoodWords; + +[DisableConventionalRegistration] +public class ToolGoodWordsPinyinConverter : IPinyinConverter +{ + public string ToPinyin(string text) + { + return WordsHelper.GetPinyin(text); + } + + public string ToPinyinInitials(string text) + { + return WordsHelper.GetFirstPinyin(text); + } +} diff --git a/modules/common/Sanhe.Abp.PinyinConverter/FodyWeavers.xml b/modules/common/Sanhe.Abp.PinyinConverter/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/common/Sanhe.Abp.PinyinConverter/Sanhe.Abp.PinyinConverter.csproj b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe.Abp.PinyinConverter.csproj new file mode 100644 index 0000000..8c3f551 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe.Abp.PinyinConverter.csproj @@ -0,0 +1,14 @@ + + + + + + + netstandard2.0 + + + + + + + diff --git a/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/AbpPinyinConverterModule.cs b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/AbpPinyinConverterModule.cs new file mode 100644 index 0000000..9057df2 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/AbpPinyinConverterModule.cs @@ -0,0 +1,8 @@ +using Volo.Abp.Modularity; + +namespace Sanhe.Abp.PinyinConverter; + +public class AbpPinyinConverterModule: AbpModule +{ + +} diff --git a/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/IPinyinConverter.cs b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/IPinyinConverter.cs new file mode 100644 index 0000000..7f141e8 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/IPinyinConverter.cs @@ -0,0 +1,20 @@ +namespace Sanhe.Abp.PinyinConverter; + +/// +/// 拼音转换器。 +/// +public interface IPinyinConverter +{ + /// + /// 文本字符串的拼音 + /// + /// 文本字符串 + /// + string ToPinyin(string text); + /// + /// 文本字符串拼音首字母 + /// + /// 文本字符串 + /// + string ToPinyinInitials(string text); +} diff --git a/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/NullPinyinConverter.cs b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/NullPinyinConverter.cs new file mode 100644 index 0000000..0478077 --- /dev/null +++ b/modules/common/Sanhe.Abp.PinyinConverter/Sanhe/Abp/PinyinConverter/NullPinyinConverter.cs @@ -0,0 +1,16 @@ +using Volo.Abp.DependencyInjection; + +namespace Sanhe.Abp.PinyinConverter; + +public class NullPinyinConverter : IPinyinConverter, ISingletonDependency +{ + public string ToPinyin(string text) + { + return text; + } + + public string ToPinyinInitials(string text) + { + return text; + } +}