Files
gpw_next/GPW.CORE.WRKLOG/Components/Pages/ForceReset.razor.cs
T
samuele 5722ad4167 WRKLOG 8.0
- porting blazor 8.0
- riorganizzazione area components
- add componenti da 6
- spostamento ver 6 a old (migrata comunque)
2024-09-04 15:28:37 +02:00

48 lines
1.1 KiB
C#

using GPW.CORE.WRKLOG.Data;
using GPW.CORE.Data.DbModels;
using System.Net.NetworkInformation;
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 GDataServ.FlushRedisCache();
AppMServ.clonedRA = null;
AppMServ.recordRA = null;
message = "Reset done!";
// attendo 1 msec
await Task.Delay(1);
// passo a pagina home
NavManager.NavigateTo("", true);
}
#endregion Protected Methods
}
}