@layout PageLayout
@inherits BasePage
@inject IDocumentationService DocumentationService
@implements IDisposable
@page "/docs/{href1}/{href2?}/{href3?}/{href4?}/{href5?}"
@if (!DocumentationService.IsLoaded())
{
}
else
{
@foreach (var doc in DocumentationService.DocContentModels)
{
if (!doc.Href.Equals(Href))
{
continue;
}
}
}
@code {
[Parameter]
public string? Href1 { get; set; }
[Parameter]
public string? Href2 { get; set; }
[Parameter]
public string? Href3 { get; set; }
[Parameter]
public string? Href4 { get; set; }
[Parameter]
public string? Href5 { get; set; }
private string Href => Href5 ?? Href4 ?? Href3 ?? Href2 ?? Href1 ?? "";
protected override void OnInitialized()
{
base.OnInitialized();
DocumentationService.Subscribe(StateHasChanged);
DocumentationService.Load();
}
void IDisposable.Dispose()
{
DocumentationService.Unsubscribe(StateHasChanged);
}
}