File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.Pinyin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk.Razor" >
2+
3+ <PropertyGroup >
4+ <Version >9.0.0</Version >
5+ </PropertyGroup >
6+
7+ <PropertyGroup >
8+ <PackageTags >Bootstrap Blazor WebAssembly wasm UI Components Pinyin</PackageTags >
9+ <Description >Bootstrap UI components extensions of Pinyin</Description >
10+ </PropertyGroup >
11+
12+ <PropertyGroup >
13+ <NET8Version >8.0.*</NET8Version >
14+ <NET9Version >9.0.*</NET9Version >
15+ <NET10Version >10.0.0-rc*</NET10Version >
16+ </PropertyGroup >
17+
18+ <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0'" >
19+ <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" $(NET8Version)" />
20+ </ItemGroup >
21+
22+ <ItemGroup Condition =" '$(TargetFramework)' == 'net7.0'" >
23+ <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" $(NET8Version)" />
24+ </ItemGroup >
25+
26+ <ItemGroup Condition =" '$(TargetFramework)' == 'net8.0'" >
27+ <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" $(NET9Version)" />
28+ </ItemGroup >
29+
30+ <ItemGroup Condition =" '$(TargetFramework)' == 'net9.0'" >
31+ <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" $(NET9Version)" />
32+ </ItemGroup >
33+
34+ <ItemGroup Condition =" '$(TargetFramework)' == 'net10.0'" >
35+ <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" $(NET10Version)" />
36+ </ItemGroup >
37+
38+ </Project >
Original file line number Diff line number Diff line change 1+ // Copyright (c) BootstrapBlazor & Argo Zhang (argo@live.ca). All rights reserved.
2+ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+ // Website: https://www.blazor.zone or https://argozhang.github.io/
4+
5+ using Microsoft . Extensions . DependencyInjection ;
6+ using Microsoft . Extensions . DependencyInjection . Extensions ;
7+
8+ namespace BootstrapBlazor . Components ;
9+
10+ /// <summary>
11+ /// BootstrapBlazor service extensions
12+ /// </summary>
13+ public static class ServiceCollectionExtension
14+ {
15+ /// <summary>
16+ /// Inject <see cref="IPinyinService"/> service extension method.
17+ /// </summary>
18+ /// <param name="services"></param>
19+ /// <returns></returns>
20+ public static IServiceCollection AddPinyinService ( this IServiceCollection services )
21+ {
22+ services . TryAddSingleton < IPinyinService , DefaultPinyinService > ( ) ;
23+
24+ return services ;
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments