@page "/" @using System.Text.Json.Nodes @implements IDisposable Home

SafeNSound

Welcome to SafeNSound! This application is purely a demonstration of the basic concepts in SafeNSound!

Here be dragons!

    @serverStatus?.ToJson(indent: true)
@code { private bool running = true; private JsonObject? serverStatus { get; set; } protected override async Task OnInitializedAsync() { _ = PollServerStatus(); } private async Task PollServerStatus() { while (running) { try { serverStatus = await App.UserClient.HttpClient.GetFromJsonAsync("/status"); } catch (Exception ex) { serverStatus = new JsonObject { ["error"] = ex.Message }; } StateHasChanged(); await Task.Delay(1000); } } private void ReleaseUnmanagedResources() { running = false; } public void Dispose() { ReleaseUnmanagedResources(); GC.SuppressFinalize(this); } ~Home() => ReleaseUnmanagedResources(); }