Class UserContextBuilder
- Namespace
- BytLabs.Application.UserContext
- Assembly
- BytLabs.Application.dll
Provides a fluent interface for configuring user context resolution. Manages the registration of resolvers in the dependency injection container.
public sealed class UserContextBuilder
- Inheritance
-
UserContextBuilder
- Inherited Members
Constructors
UserContextBuilder(IServiceCollection)
Initializes a new instance of the UserContextBuilder.
public UserContextBuilder(IServiceCollection services)
Parameters
services
IServiceCollectionService collection for dependency registration
Methods
AddResolver(IUserContextResolver)
public UserContextBuilder AddResolver(IUserContextResolver resolver)
Parameters
resolver
IUserContextResolver
Returns
AddResolver<T>()
Registers a resolver in the service collection.
public UserContextBuilder AddResolver<T>() where T : class, IUserContextResolver
Returns
- UserContextBuilder
The builder instance for method chaining
Type Parameters
T
AddResolver<T>(Func<IServiceProvider, T>)
public UserContextBuilder AddResolver<T>(Func<IServiceProvider, T> factory) where T : class, IUserContextResolver
Parameters
factory
Func<IServiceProvider, T>
Returns
Type Parameters
T