public sealed class ErrorNotification : ComponentBase,
IHasNavigationManager, IHasLocalization| ErrorNotification | Initializes a new instance of the ErrorNotification class |
| CosmosDb | Dependency injected Cosmos DB |
| CurrentUser | Cascaded UserSessionData instance. |
| ExceptionObject | The error object should be passed from the parent component which is wrapped by the ErrorBoundary. |
| FailureHandler | Dependency injected failure handler |
| Loc |
Dependency injection for the localization tool. It derives texts established in CosmosDB's "LocalizedStrings" container.
It can be used by invoking it as an array, with the key of the text you want to get. Parameters for the string can be added in the array as well,
similar to Format(String, Object). If the text is not found, it will return the key itself as fallback. The language the key will be localized based on is based on the CurrentCulture and the CurrentUICulture. If you want to localize something in a different language, you will have to apply the culture on the CultureInfo properties, get the text, and revert back to the original culture. |
| NavigationManager |
Dependency injected NavigationManager for navigating to different pages. Note: in Blazor, navigation is done in a 'fake' manner so the entire page doesn't need to be reloaded. If you want to make sure the page is reloaded, or if we're going somewhere outside the Blazor context, ensure you set the parameter 'forceLoad' in method NavigateTo(String, Boolean, Boolean) to true. |
| OnHandle | Invoke the parent component to handle the error. |
| SetParametersAsync |
Parameters are loaded manually for sake of performance; if we were to use System.Reflection magic, it would hurt performance if components were used in large numbers.
(Overrides ComponentBaseSetParametersAsync(ParameterView)) |