-
Notifications
You must be signed in to change notification settings - Fork 1
Routing
Antoine Théate edited this page Oct 26, 2023
·
1 revision
On navigation, some verification are made to allow or not the navigation.
To access a page, it is required that an Application has been registered for the specific URL and that this Application is not Disabled.
Example: Create Applications static class
/// <summary>
/// Provides all available application contained into the current web application
/// </summary>
public static class Applications
{
/// <summary>
/// List of <see cref="Application" />
/// </summary>
public static List<Application> ExistingApplications => new()
{
new Application
{
Name = "Page A",
Url = "AnURL"
}
}
}
Inside the Program.cs, when registering the Common library:
builder.Services.RegisterCommonLibrary(options =>
{
options.Applications = Applications.ExistingApplications;
}
With that setup, navigating to AnURL is allowed
copyright @ Starion Group S.A.