Skip to content

Commit

Permalink
Merge pull request #11097 from abpframework/liangshiwei/ui-blazor
Browse files Browse the repository at this point in the history
Add some serivces to AbpComponentBase
  • Loading branch information
cotur authored Dec 28, 2021
2 parents e34b54c + 55d2771 commit e0cc584
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Volo.Abp.Localization\Volo.Abp.Localization.csproj" />
<ProjectReference Include="..\Volo.Abp.Timing\Volo.Abp.Timing.csproj" />
<ProjectReference Include="..\Volo.Abp.ObjectMapping\Volo.Abp.ObjectMapping.csproj" />
<ProjectReference Include="..\Volo.Abp.Security\Volo.Abp.Security.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
using Volo.Abp.Modularity;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Security;
using Volo.Abp.Timing;

namespace Volo.Abp.AspNetCore.Components;

[DependsOn(
typeof(AbpObjectMappingModule),
typeof(AbpSecurityModule),
typeof(AbpLocalizationModule)
typeof(AbpTimingModule)
)]
public class AbpAspNetCoreComponentsModule : AbpModule
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
using Volo.Abp.AspNetCore.Components.Messages;
using Volo.Abp.AspNetCore.Components.Notifications;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Timing;
using Volo.Abp.Users;

namespace Volo.Abp.AspNetCore.Components;
Expand Down Expand Up @@ -54,6 +56,9 @@ protected Type LocalizationResource {
protected ICurrentUser CurrentUser => LazyGetRequiredService(ref _currentUser);
private ICurrentUser _currentUser;

protected ICurrentTenant CurrentTenant => LazyGetRequiredService(ref _currentTenant);
private ICurrentTenant _currentTenant;

protected IUiMessageService Message => LazyGetNonScopedRequiredService(ref _message);
private IUiMessageService _message;

Expand All @@ -66,6 +71,9 @@ protected Type LocalizationResource {
protected IAlertManager AlertManager => LazyGetNonScopedRequiredService(ref _alertManager);
private IAlertManager _alertManager;

protected IClock Clock => LazyGetNonScopedRequiredService(ref _clock);
private IClock _clock;

protected AlertList Alerts => AlertManager.Alerts;

protected IObjectMapper ObjectMapper {
Expand Down

0 comments on commit e0cc584

Please sign in to comment.