Class IocModule
Represents a module for configuring and managing services within a dependency injection container.
Inherited Members
Namespace: Innovt.Core.CrossCutting.Ioc
Assembly: Innovt.Core.dll
Syntax
public class IocModule
Remarks
This class provides a way to define and manage services within a dependency injection container. Developers can create custom modules to configure and add services to the container, making it easier to organize and maintain the service registration code.
Constructors
| Edit this page View SourceIocModule()
Initializes a new instance of the IocModule class with a new ServiceCollection.
Declaration
public IocModule()
IocModule(IServiceCollection)
Initializes a new instance of the IocModule class with the provided services
.
Declaration
public IocModule(IServiceCollection services)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection to be used for service registration. |
Properties
| Edit this page View SourceServices
Gets the IServiceCollection used for service registration and configuration.
Declaration
public IServiceCollection Services { get; }
Property Value
Type | Description |
---|---|
IServiceCollection |
Methods
| Edit this page View SourceAppendServices(IServiceCollection)
Appends services from an external IServiceCollection to the module's services.
Declaration
public IServiceCollection AppendServices(IServiceCollection externalServices)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | externalServices | The external IServiceCollection containing services to append. |
Returns
Type | Description |
---|---|
IServiceCollection | The updated IServiceCollection after appending external services. |
GetServices()
Gets the IServiceCollection used for service registration and configuration.
Declaration
public IServiceCollection GetServices()
Returns
Type | Description |
---|---|
IServiceCollection | The IServiceCollection associated with this module. |