mirror of https://github.com/abpframework/abp.git
5 changed files with 58 additions and 1 deletions
@ -0,0 +1,29 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.AspNetCore.Components.Web.Configuration; |
|||
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.EventBus.Local; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Server.Configuration |
|||
{ |
|||
[Dependency(ReplaceServices = true)] |
|||
public class BlazorServerCurrentApplicationConfigurationCacheResetService : |
|||
ICurrentApplicationConfigurationCacheResetService, |
|||
ITransientDependency |
|||
{ |
|||
private readonly ILocalEventBus _localEventBus; |
|||
|
|||
public BlazorServerCurrentApplicationConfigurationCacheResetService( |
|||
ILocalEventBus localEventBus) |
|||
{ |
|||
_localEventBus = localEventBus; |
|||
} |
|||
|
|||
public async Task ResetAsync() |
|||
{ |
|||
await _localEventBus.PublishAsync( |
|||
new CurrentApplicationConfigurationCacheResetEventData() |
|||
); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Configuration |
|||
{ |
|||
public interface ICurrentApplicationConfigurationCacheResetService |
|||
{ |
|||
Task ResetAsync(); |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Configuration |
|||
{ |
|||
public class NullCurrentApplicationConfigurationCacheResetService : ICurrentApplicationConfigurationCacheResetService, ISingletonDependency |
|||
{ |
|||
public Task ResetAsync() |
|||
{ |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue