Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class Extensions

    Provides extension methods for working with IServiceCollection and dependency injection.

    Inheritance
    object
    Extensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Core.CrossCutting.Ioc
    Assembly: Innovt.Core.dll
    Syntax
    public static class Extensions
    Remarks

    This static class contains extension methods that enhance the functionality of the IServiceCollection interface, enabling easier registration of services and modules.

    Methods

    | Edit this page View Source

    AddModule(IServiceCollection, IocModule)

    Adds services from the specified module to the services collection.

    Declaration
    public static void AddModule(this IServiceCollection services, IocModule module)
    Parameters
    Type Name Description
    IServiceCollection services

    The IServiceCollection to which services should be added.

    IocModule module

    The IocModule containing services to be added.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if services or module is null.

    | Edit this page View Source

    AddModule(IServiceCollection, Assembly)

    Adds services defined in modules from the specified assembly to the services collection.

    Declaration
    public static void AddModule(this IServiceCollection services, Assembly assembly)
    Parameters
    Type Name Description
    IServiceCollection services

    The IServiceCollection to which services should be added.

    Assembly assembly

    The assembly containing modules to be added.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if services or assembly is null.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX