Files
limanapp/LiMan.UI/Pages/Reset.razor.cs
T
2024-07-15 11:22:39 +02:00

44 lines
1.1 KiB
C#

using LiMan.UI.Data;
using Microsoft.AspNetCore.Components;
using System.Threading.Tasks;
using Liman.CadCam.Services;
using Microsoft.Extensions.Configuration;
namespace LiMan.UI.Pages
{
public partial class Reset
{
#region Protected Properties
[Inject]
protected CadCamService CCService { get; set; } = null!;
[Inject]
protected LiManDataService DataService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await DataService.InvalidateAllCache();
await CCService.FlushRedisCache();
// rimando alla home
string baseAppPath = Configuration["RuntimeOpt:BaseUrl"];
NavMan.NavigateTo(baseAppPath, true);
}
#endregion Protected Methods
#region Private Properties
[Inject]
private IConfiguration Configuration { get; set; } = null!;
[Inject]
private NavigationManager NavMan { get; set; } = null!;
#endregion Private Properties
}
}