21.166. Class ServiceCollectionExt

Namespace: ArmoniK.Core.Common.Injection
Assembly: ArmoniK.Core.Common.dll

Extends the functionality of the

public static class ServiceCollectionExt

21.166.1. Inheritance

objectServiceCollectionExt

21.166.2. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

21.166.3. Methods

21.166.3.1. AddAdapter(IServiceCollection, ConfigurationManager, string, ILogger)

Dynamically load the services from the specified storage that implements and add them to the service collection

public static IServiceCollection AddAdapter(this IServiceCollection services, ConfigurationManager configuration, string storage, ILogger logger)

21.166.3.1.1. Parameters

services IServiceCollection

Collection of service descriptors

configuration ConfigurationManager

Configuration manager to retrieve adapter settings

storage string

Storage identifier for the adapter settings

logger ILogger

Logger instance for logging information

21.166.3.1.2. Returns

IServiceCollection

The updated collection of service descriptors

21.166.3.1.3. Exceptions

InvalidOperationException

Thrown when the adapter absolute path or class name is null or empty, or when the provided type does not implement interface, or when the type cannot be instantiated.

21.166.3.2. AddArmoniKWorkerConnection(IServiceCollection, IConfiguration)

Add the services to create connection to the worker

[PublicAPI]
public static IServiceCollection AddArmoniKWorkerConnection(this IServiceCollection services, IConfiguration configuration)

21.166.3.2.1. Parameters

services IServiceCollection

Collection of service descriptors

configuration IConfiguration

Collection of configuration used to configure the added services

21.166.3.2.2. Returns

IServiceCollection

The updated collection of service descriptors

21.166.3.3. AddExceptionManager(IServiceCollection, Func<IServiceProvider, Options>?)

Add singleton for

[PublicAPI]
public static IServiceCollection AddExceptionManager(this IServiceCollection services, Func<IServiceProvider, ExceptionManager.Options>? optionsFactory = null)

21.166.3.3.1. Parameters

services IServiceCollection

Collection of service descriptors

optionsFactory Func<IServiceProvider, ExceptionManager.Options>?

Function to create from

21.166.3.3.2. Returns

IServiceCollection

The updated collection of service descriptors

21.166.3.4. ValidateGrpcRequests(IServiceCollection)

Add validation services for gRPC Requests

[PublicAPI]
public static IServiceCollection ValidateGrpcRequests(this IServiceCollection services)

21.166.3.4.1. Parameters

services IServiceCollection

Collection of service descriptors

21.166.3.4.2. Returns

IServiceCollection

The updated collection of service descriptors