Agent code and restructuring
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
@implements IDisposable;
|
||||
|
||||
@inject IGlossaryDialogService glossaryDialogService
|
||||
|
||||
@if (glossaryDialogService.HasDialog())
|
||||
{
|
||||
<GlossaryDialogComponent></GlossaryDialogComponent>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
glossaryDialogService.Subscribe(OnUpdate);
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
glossaryDialogService.Unsubscribe(OnUpdate);
|
||||
}
|
||||
|
||||
void OnUpdate()
|
||||
{
|
||||
InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user