File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.Region Expand file tree Collapse file tree 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+
7+ namespace BootstrapBlazor . Components ;
8+
9+ /// <summary>
10+ /// BootstrapBlazor service extensions
11+ /// </summary>
12+ public static class ServiceCollectionExtension
13+ {
14+ /// <summary>
15+ /// Inject <see cref="IRegionService"/> service extension method.
16+ /// </summary>
17+ /// <param name="services"></param>
18+ /// <returns></returns>
19+ public static IServiceCollection AddBootstrapBlazorRegionService ( this IServiceCollection services )
20+ {
21+ services . AddSingleton < IRegionService , DefaultRegionService > ( ) ;
22+
23+ return services ;
24+ }
25+ }
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+ namespace BootstrapBlazor . Components ;
6+
7+ class DefaultRegionService : IRegionService
8+ {
9+
10+ }
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+ namespace BootstrapBlazor . Components ;
6+
7+ /// <summary>
8+ /// IRegion 获得行政区域数据接口
9+ /// </summary>
10+ public interface IRegionService
11+ {
12+ }
You can’t perform that action at this time.
0 commit comments