Table of Contents

Class ModelHandlerAttributeRegistrar

Namespace
Htmx.Components.Configuration
Assembly
Htmx.Components.dll

Automatically discovers and registers model handlers marked with ModelConfigAttribute during application startup by scanning controller classes for configuration methods.

public static class ModelHandlerAttributeRegistrar
Inheritance
ModelHandlerAttributeRegistrar
Inherited Members

Remarks

This registrar uses reflection to find methods decorated with ModelConfigAttribute and automatically invokes them during model registry initialization. The scanning is performed once and cached for performance.

Methods

RegisterAll(IModelRegistry)

Registers all discovered model handlers with the provided registry.

public static void RegisterAll(IModelRegistry registry)

Parameters

registry IModelRegistry

The model registry to register handlers with.

Remarks

This method performs controller scanning on first call and caches results. Subsequent calls reuse the cached registrations for performance.