Blazor IComponentTypeSwitchBroker
This page was created by Hans.karlsen on 2024-09-19. Last edited by Stephanie on 2025-03-13.
In Blazor, one can inject unique components as described here EXT_ComponentsBlazor
But you can also replace all or some components based on a Switch-logic you define yourself:
public interface IComponentTypeSwitchBroker { Type SwitchThis(IMDCompHolder compholder,Type theType); }
The assembly and type that implements this interface is then given in the SysMDrivenMiscSettingsSingleton property GlobalBlazorClientComponentOverride, in the same format as you do for EXT_ComponentsBlazor , namely:
AssemblyNameWithoutExtension;AdditionalAssemblyIfNeededWithoutExtension;AsManyAssembliesAsNeededWithoutExtension;TheTypeImplementing_IComponentTypeSwitchBroker