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
servicesIServiceCollectionThe service collection.
configureAction<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
builderIMvcBuilder
Returns
AddHtmxComponentsApplicationPart(IMvcCoreBuilder)
Adds the Htmx Components application part to MVC Core.
public static IMvcCoreBuilder AddHtmxComponentsApplicationPart(this IMvcCoreBuilder builder)
  Parameters
builderIMvcCoreBuilder
Returns
AddSafeActionContextAccessor(IServiceCollection, string)
Registers IActionContextAccessor safely before MVC infrastructure.
public static IServiceCollection AddSafeActionContextAccessor(this IServiceCollection services, string extensionMethodName = "AddSafeActionContextAccessor")
  Parameters
servicesIServiceCollectionextensionMethodNamestring