Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Type extension

ServiceCollectionExtensions

extension ServiceCollectionExtensions for ServiceCollection

Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.Abstractions.dll

Typed reference-service registrations with checked runtime assignability.

Receiver

ServiceCollection

Methods

46 items
Extension member: AddKeyedScoped<TService, TImplementation>(key: object?) -> Result<void, ServiceError> Registers a keyed scoped implementation of TService. Extension from ServiceCollectionExtensions.AddKeyedScoped
Extension member: AddKeyedScoped<TService>(key: object?) -> Result<void, ServiceError> Registers TService as its own keyed scoped implementation. Extension from ServiceCollectionExtensions.AddKeyedScoped
Extension member: AddKeyedSingleton<TService, TImplementation>(key: object?) -> Result<void, ServiceError> Registers a keyed singleton implementation of TService. Extension from ServiceCollectionExtensions.AddKeyedSingleton
Extension member: AddKeyedSingleton<TService>(key: object?, instance: TService) -> Result<void, ServiceError> Registers a caller-owned keyed value, including a bound function object. Extension from ServiceCollectionExtensions.AddKeyedSingleton
Extension member: AddKeyedSingleton<TService>(key: object?) -> Result<void, ServiceError> Registers TService as its own keyed singleton implementation. Extension from ServiceCollectionExtensions.AddKeyedSingleton
Extension member: AddKeyedTransient<TService, TImplementation>(key: object?) -> Result<void, ServiceError> Registers a keyed transient implementation of TService. Extension from ServiceCollectionExtensions.AddKeyedTransient
Extension member: AddKeyedTransient<TService>(key: object?) -> Result<void, ServiceError> Registers TService as its own keyed transient implementation. Extension from ServiceCollectionExtensions.AddKeyedTransient
Extension member: AddScoped<TService, TImplementation>() -> Result<void, ServiceError> Registers a scoped service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddScoped
Extension member: AddScoped<TService>(factory: (ServiceProvider) -> Result<TService, ServiceError>) -> Result<void, ServiceError> Registers a scoped service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddScoped
Extension member: AddScoped<TService>() -> Result<void, ServiceError> Registers a scoped service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddScoped
Extension member: AddSingleton<TService, TImplementation>() -> Result<void, ServiceError> Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddSingleton
Extension member: AddSingleton<TService>(factory: (ServiceProvider) -> Result<TService, ServiceError>) -> Result<void, ServiceError> Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddSingleton
Extension member: AddSingleton<TService>(instance: TService) -> Result<void, ServiceError> Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddSingleton
Extension member: AddSingleton<TService>() -> Result<void, ServiceError> Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddSingleton
Extension member: AddTransient<TService, TImplementation>() -> Result<void, ServiceError> Registers a transient service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddTransient
Extension member: AddTransient<TService>(factory: (ServiceProvider) -> Result<TService, ServiceError>) -> Result<void, ServiceError> Registers a transient service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddTransient
Extension member: AddTransient<TService>() -> Result<void, ServiceError> Registers a transient service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.AddTransient
Extension member: TryAdd(service: TypeInfo, implementation: TypeInfo, lifetime: ServiceLifetime) -> Result<bool, ServiceError> Adds an implementation only when its exact unkeyed service is absent. Extension from ServiceCollectionExtensions.TryAdd
Extension member: TryAddInstance(service: TypeInfo, instance: object) -> Result<bool, ServiceError> Adds a caller-owned instance only when its service is absent. Extension from ServiceCollectionExtensions.TryAddInstance
Extension member: TryAddKeyed(service: TypeInfo, key: object?, implementation: TypeInfo, lifetime: ServiceLifetime) -> Result<bool, ServiceError> Adds an implementation only when its exact service type/key is absent. Extension from ServiceCollectionExtensions.TryAddKeyed
Extension member: TryAddKeyedInstance(service: TypeInfo, key: object?, instance: object) -> Result<bool, ServiceError> Adds a caller-owned instance only when its service type/key is absent. Extension from ServiceCollectionExtensions.TryAddKeyedInstance
Extension member: TryAddKeyedScoped<TService, TImplementation>(key: object?) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a keyed scoped implementation of TService. Extension from ServiceCollectionExtensions.TryAddKeyedScoped
Extension member: TryAddKeyedScoped<TService>(key: object?, factory: (ServiceProvider, object?) -> Result<TService, ServiceError>) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a keyed typed factory; its returned service becomes provider-owned. Extension from ServiceCollectionExtensions.TryAddKeyedScoped
Extension member: TryAddKeyedScoped<TService>(key: object?) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers TService as its own keyed scoped implementation. Extension from ServiceCollectionExtensions.TryAddKeyedScoped
Extension member: TryAddKeyedSingleton<TService, TImplementation>(key: object?) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a keyed singleton implementation of TService. Extension from ServiceCollectionExtensions.TryAddKeyedSingleton
Extension member: TryAddKeyedSingleton<TService>(key: object?, factory: (ServiceProvider, object?) -> Result<TService, ServiceError>) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a keyed typed factory; its returned service becomes provider-owned. Extension from ServiceCollectionExtensions.TryAddKeyedSingleton
Extension member: TryAddKeyedSingleton<TService>(key: object?, instance: TService) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a caller-owned keyed value, including a bound function object. Extension from ServiceCollectionExtensions.TryAddKeyedSingleton
Extension member: TryAddKeyedSingleton<TService>(key: object?) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers TService as its own keyed singleton implementation. Extension from ServiceCollectionExtensions.TryAddKeyedSingleton
Extension member: TryAddKeyedTransient<TService, TImplementation>(key: object?) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a keyed transient implementation of TService. Extension from ServiceCollectionExtensions.TryAddKeyedTransient
Extension member: TryAddKeyedTransient<TService>(key: object?, factory: (ServiceProvider, object?) -> Result<TService, ServiceError>) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a keyed typed factory; its returned service becomes provider-owned. Extension from ServiceCollectionExtensions.TryAddKeyedTransient
Extension member: TryAddKeyedTransient<TService>(key: object?) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers TService as its own keyed transient implementation. Extension from ServiceCollectionExtensions.TryAddKeyedTransient
Extension member: TryAddScoped<TService, TImplementation>() -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a scoped service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddScoped
Extension member: TryAddScoped<TService>(factory: (ServiceProvider) -> Result<TService, ServiceError>) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a scoped service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddScoped
Extension member: TryAddScoped<TService>() -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a scoped service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddScoped
Extension member: TryAddSingleton<TService, TImplementation>() -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddSingleton
Extension member: TryAddSingleton<TService>(factory: (ServiceProvider) -> Result<TService, ServiceError>) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddSingleton
Extension member: TryAddSingleton<TService>(instance: TService) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddSingleton
Extension member: TryAddSingleton<TService>() -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a singleton service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddSingleton
Extension member: TryAddTransient<TService, TImplementation>() -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a transient service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddTransient
Extension member: TryAddTransient<TService>(factory: (ServiceProvider) -> Result<TService, ServiceError>) -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a transient service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddTransient
Extension member: TryAddTransient<TService>() -> Result<bool, ServiceError> Adds only when the service type/key is absent. Registers a transient service; invalid types or results are reported as ServiceError. Extension from ServiceCollectionExtensions.TryAddTransient