Class ServiceCollectionExtensions
- Namespace
- TwBlazor
- Assembly
- TwBlazor.dll
Extension methods for configuring TwBlazor services.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
AddTwBlazor(IServiceCollection, Action<TwBlazorOptions>, Func<TwBlazorTheme>)
Adds TwBlazor services to the service collection with a theme factory, enabling hot reload support.
public static IServiceCollection AddTwBlazor(this IServiceCollection services, Action<TwBlazorOptions> configure, Func<TwBlazorTheme> themeFactory)
Parameters
servicesIServiceCollectionThe service collection.
configureAction<TwBlazorOptions>Action to configure TwBlazor options.
themeFactoryFunc<TwBlazorTheme>A factory function that creates the theme. Called again on hot reload.
Returns
- IServiceCollection
The service collection for method chaining.
AddTwBlazor(IServiceCollection, Action<TwBlazorOptions>, TwBlazorTheme)
Adds TwBlazor services to the service collection with custom configuration.
public static IServiceCollection AddTwBlazor(this IServiceCollection services, Action<TwBlazorOptions> configure, TwBlazorTheme theme)
Parameters
servicesIServiceCollectionThe service collection.
configureAction<TwBlazorOptions>Action to configure TwBlazor options.
themeTwBlazorThemeThe theme configuration.
Returns
- IServiceCollection
The service collection for method chaining.
AddTwBlazor(IServiceCollection, TwBlazorTheme)
Adds TwBlazor services to the service collection with default configuration.
public static IServiceCollection AddTwBlazor(this IServiceCollection services, TwBlazorTheme theme)
Parameters
servicesIServiceCollectionThe service collection.
themeTwBlazorThemeThe theme configuration.
Returns
- IServiceCollection
The service collection for method chaining.