-
-
Notifications
You must be signed in to change notification settings - Fork 7
feat(Pinyin): add Pinyin service #616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <Project> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks> | ||
| <TargetFrameworks>net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
38 changes: 38 additions & 0 deletions
38
src/components/BootstrapBlazor.Pinyin/BootstrapBlazor.Pinyin.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
|
||
| <PropertyGroup> | ||
| <Version>9.0.0</Version> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <PackageTags>Bootstrap Blazor WebAssembly wasm UI Components Pinyin</PackageTags> | ||
| <Description>Bootstrap UI components extensions of Pinyin</Description> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <NET8Version>8.0.*</NET8Version> | ||
| <NET9Version>9.0.*</NET9Version> | ||
| <NET10Version>10.0.0-rc*</NET10Version> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'"> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(NET8Version)" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net7.0'"> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(NET8Version)" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(NET9Version)" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net9.0'"> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(NET9Version)" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net10.0'"> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(NET10Version)" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
26 changes: 26 additions & 0 deletions
26
src/components/BootstrapBlazor.Pinyin/Extensions/ServiceCollectionExtension.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved. | ||
| // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
| // Website: https://www.blazor.zone or https://argozhang.github.io/ | ||
|
|
||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.Extensions.DependencyInjection.Extensions; | ||
|
|
||
| namespace BootstrapBlazor.Components; | ||
|
|
||
| /// <summary> | ||
| /// BootstrapBlazor service extensions | ||
| /// </summary> | ||
| public static class ServiceCollectionExtension | ||
| { | ||
| /// <summary> | ||
| /// Inject <see cref="IPinyinService"/> service extension method. | ||
| /// </summary> | ||
| /// <param name="services"></param> | ||
| /// <returns></returns> | ||
| public static IServiceCollection AddPinyinService(this IServiceCollection services) | ||
| { | ||
| services.TryAddSingleton<IPinyinService, DefaultPinyinService>(); | ||
|
|
||
| return services; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the condition to only net10.0 stops copying the logo for net9.0 builds. If both are intended, update the condition to include both frameworks, e.g.: Condition="'$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net10.0'".