17.161. Class ServiceCollectionExt

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

Extends the functionality of the

public static class ServiceCollectionExt

17.161.1. Inheritance

objectServiceCollectionExt

17.161.2. Inherited Members

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

17.161.3. Methods

17.161.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)

17.161.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

17.161.3.1.2. Returns

IServiceCollection

The updated collection of service descriptors

17.161.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.

17.161.3.2. AddArmoniKWorkerConnection(IServiceCollection, IConfiguration)

Add the services to create connection to the worker

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

17.161.3.2.1. Parameters

services IServiceCollection

Collection of service descriptors

configuration IConfiguration

Collection of configuration used to configure the added services

17.161.3.2.2. Returns

IServiceCollection

The updated collection of service descriptors

17.161.3.3. ValidateGrpcRequests(IServiceCollection)

Add validation services for gRPC Requests

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

17.161.3.3.1. Parameters

services IServiceCollection

Collection of service descriptors

17.161.3.3.2. Returns

IServiceCollection

The updated collection of service descriptors