Class ServiceCollectionExtensions
- Namespace
- Htmx.Components
- Assembly
- Htmx.Components.dll
Extension methods for registering Htmx Components services.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
AddHtmxComponents(IServiceCollection, Action<HtmxComponentOptions>?)
Registers all required Htmx Components services and configuration.
public static IServiceCollection AddHtmxComponents(this IServiceCollection services, Action<HtmxComponentOptions>? configure = null)
Parameters
services
IServiceCollectionThe service collection.
configure
Action<HtmxComponentOptions>Optional configuration action for HtmxComponentOptions.
Returns
- IServiceCollection
The service collection.
AddHtmxComponentsApplicationPart(IMvcBuilder)
Adds the Htmx Components application part to MVC.
public static IMvcBuilder AddHtmxComponentsApplicationPart(this IMvcBuilder builder)
Parameters
builder
IMvcBuilder
Returns
AddHtmxComponentsApplicationPart(IMvcCoreBuilder)
Adds the Htmx Components application part to MVC Core.
public static IMvcCoreBuilder AddHtmxComponentsApplicationPart(this IMvcCoreBuilder builder)
Parameters
builder
IMvcCoreBuilder
Returns
AddSafeActionContextAccessor(IServiceCollection, string)
Registers IActionContextAccessor safely before MVC infrastructure.
public static IServiceCollection AddSafeActionContextAccessor(this IServiceCollection services, string extensionMethodName = "AddSafeActionContextAccessor")
Parameters
services
IServiceCollectionextensionMethodName
string