public class MainLayout : LayoutComponentBase, IHasNavigationManager,
IHasAzureStorage, IHasLocalization, IDisposable| MainLayout | Initializes a new instance of the MainLayout class |
| AzureFileStorage |
Dependency injection of the IAzureStorage Azure Blob Storage service. Every CompanyDto, except for MobileTrack itself (for now?) has their own folder in the blob storage to store files in. This can be their logo or icon files, images representing users or Devices, or attachments they want to store. It can also be used to store reports in generated by MobileTrack Nexus. |
| CancellationToken | Cancellation token for the component; this can be used for asynchronous operations on the components, to shut them down if the component has ended its lifetime. |
| CosmosDb | Dependency injected Azure Cosmos Database |
| CurrentUser | Container for the current user, their role and the company/environment they're working on. |
| HttpContextAccessor | Dependency injected HttpContext for the current user. |
| HttpPageRedirect | Telemetry metric to record page redirects. |
| HttpPageSuccess | Telemetry metric to record successful page loads. |
| 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. |
| ModalService | Dependency injected ModalService for showing dialogs. |
| 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. |
| PreloadService | Dependency injected PreloadService for showing and hiding the preload spinner |
| TelemetryClient | Azure Application Insights Telemetry Client |
| ToastService | Toast messages service |
| BuildRenderTree | (Overrides ComponentBaseBuildRenderTree(RenderTreeBuilder)) |
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| OnAfterRender |
Method invoked after each time the component has rendered interactively and the UI has finished
updating (for example, after elements have been added to the browser DOM). Any ElementReference
fields will be populated by the time this runs.
This method is not invoked during prerendering or server-side rendering, because those processes
are not attached to any live browser DOM and are already complete before the DOM is updated.
(Overrides ComponentBaseOnAfterRender(Boolean)) |
| OnInitialized |
Method invoked when the component is ready to start, having received its
initial parameters from its parent in the render tree.
(Overrides ComponentBaseOnInitialized) |
| OnParametersSetAsync |
Method invoked when the component has received parameters from its parent in
the render tree, and the incoming values have been assigned to properties.
(Overrides ComponentBaseOnParametersSetAsync) |