@implements IDisposable;

@inject IMyDialogService MyDialogService

<ConfirmationDialogComponent></ConfirmationDialogComponent>

@code {

    protected override void OnInitialized()
    {
        base.OnInitialized();
        MyDialogService.Subscribe(OnUpdate);
    }

    void IDisposable.Dispose()
    {
        MyDialogService.Unsubscribe(OnUpdate);
    }

    void OnUpdate()
    {
        StateHasChanged();
    }

}