Files
gpw_next/GPW.CORE.WRKLOG/Components/Pages/ForceReset.razor.cs
T
Samuele Locatelli b1afa82a91 Continuo spostamento servizi in Data:
- GpwDataSrvice
- MessageService
- ogni dipendenza (aggiunti using, in _import non basta...)
2024-09-07 11:40:28 +02:00

47 lines
1.1 KiB
C#

using GPW.CORE.Data.Services;
using Microsoft.AspNetCore.Components;
namespace GPW.CORE.WRKLOG.Components.Pages
{
public partial class ForceReset
{
#region Protected Fields
protected string message = "Resetting Cache!";
#endregion Protected Fields
#region Protected Properties
[Inject]
protected MessageService AppMServ { get; set; } = null!;
[Inject]
protected GpwDataService GDataServ { get; set; } = null!;
[Inject]
protected NavigationManager NavManager { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await Task.Delay(10);
await GDataServ.FlushRedisCache();
await Task.Delay(10);
AppMServ.clonedRA = null;
AppMServ.recordRA = null;
message = "Reset done, now redirect!";
await Task.Delay(100);
// passo a pagina home
NavManager.NavigateTo("Home", true);
}
#endregion Protected Methods
}
}