@using Hcs.WebApp.Services @using Newtonsoft.Json @inject RegistryService RegistryService @code { string? content; [Parameter] public required RegistryElement RegistryElement { get; set; } protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); if (string.IsNullOrEmpty(RegistryElement.Json)) { RegistryElement.Json = await RegistryService.GetRegistryElementJsonAsync(RegistryElement.Id); } if (!string.IsNullOrEmpty(RegistryElement.Json)) { content = JsonConvert.SerializeObject(JsonConvert.DeserializeObject(RegistryElement.Json!), Formatting.Indented); } } }