Files
gpw_next/GPW.CORE.ADM/Components/Pages/ForceReset.razor.cs
T
Samuele Locatelli dca3ad5847 - cleanup pagine inutilizzate + prime pagine WIP
- fix navMenu
- fix vari
2024-09-09 17:38:12 +02:00

47 lines
1.1 KiB
C#

using GPW.CORE.Data.Services;
using Microsoft.AspNetCore.Components;
namespace GPW.CORE.ADM.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
}
}