ServiceCollection Clase

Definición

Implementación predeterminada de IServiceCollection.

public ref class ServiceCollection : Microsoft::Extensions::DependencyInjection::IServiceCollection, System::Collections::Generic::ICollection<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^>, System::Collections::Generic::IEnumerable<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^>, System::Collections::Generic::IList<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^>
public class ServiceCollection : Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Collections.Generic.ICollection<Microsoft.Extensions.DependencyInjection.ServiceDescriptor>, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyInjection.ServiceDescriptor>, System.Collections.Generic.IList<Microsoft.Extensions.DependencyInjection.ServiceDescriptor>
type ServiceCollection = class
    interface IServiceCollection
    interface IList<ServiceDescriptor>
    interface ICollection<ServiceDescriptor>
    interface seq<ServiceDescriptor>
    interface IEnumerable
type ServiceCollection = class
    interface IServiceCollection
    interface ICollection<ServiceDescriptor>
    interface seq<ServiceDescriptor>
    interface IEnumerable
    interface IList<ServiceDescriptor>
Public Class ServiceCollection
Implements ICollection(Of ServiceDescriptor), IEnumerable(Of ServiceDescriptor), IList(Of ServiceDescriptor), IServiceCollection
Herencia
ServiceCollection
Implementaciones

Constructores

Nombre Description
ServiceCollection()

Inicializa una nueva instancia de la clase ServiceCollection.

Propiedades

Nombre Description
Count

Obtiene el número de elementos contenidos en el ICollection<T>.

IsReadOnly

Obtiene un valor que indica si es ICollection<T> de solo lectura.

Item[Int32]

Obtiene o establece el elemento en el índice especificado.

Métodos

Nombre Description
Clear()

Quita todos los elementos de la ICollection<T>.

Contains(ServiceDescriptor)

Determina si contiene ICollection<T> un valor específico.

CopyTo(ServiceDescriptor[], Int32)

Copia los elementos de en ICollection<T> un Arrayobjeto , comenzando en un índice determinado Array .

Equals(Object)

Determina si el objeto especificado es igual al objeto actual.

(Heredado de Object)
GetEnumerator()

Devuelve un enumerador que recorre en iteración la colección.

GetHashCode()

Actúa como función hash predeterminada.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
IndexOf(ServiceDescriptor)

Determina el índice de un elemento específico en .IList<T>

Insert(Int32, ServiceDescriptor)

Inserta un elemento en el IList<T> en el índice especificado.

MakeReadOnly()

Hace que esta colección sea de solo lectura.

MemberwiseClone()

Crea una copia superficial del Objectactual.

(Heredado de Object)
Remove(ServiceDescriptor)

Quita la primera aparición de un objeto específico de la ICollection<T>.

RemoveAt(Int32)

Quita el elemento IList<T> en el índice especificado.

ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Implementaciones de interfaz explícitas

Nombre Description
ICollection<ServiceDescriptor>.Add(ServiceDescriptor)

Agrega un elemento al ICollection<T>.

IEnumerable.GetEnumerator()

Devuelve un enumerador que recorre en iteración una colección.

Métodos de extensión

Nombre Description
Add(IServiceCollection, IEnumerable<ServiceDescriptor>)

Agrega una secuencia de ServiceDescriptor al collection.

Add(IServiceCollection, ServiceDescriptor)

Agrega el descriptor especificado al collection.

AddHostedService<THostedService>(IServiceCollection, Func<IServiceProvider,THostedService>)

Agregue un registro IHostedService para el tipo especificado.

AddHostedService<THostedService>(IServiceCollection)

Agregue un registro IHostedService para el tipo especificado.

AddHybridCache(IServiceCollection, Action<HybridCacheOptions>)

Agrega compatibilidad con los servicios de almacenamiento en caché de varios niveles.

AddHybridCache(IServiceCollection)

Agrega compatibilidad con los servicios de almacenamiento en caché de varios niveles.

AddKeyedHybridCache(IServiceCollection, Object, Action<HybridCacheOptions>)

Agrega compatibilidad con servicios de almacenamiento en caché de varios niveles con un registro con claves.

AddKeyedHybridCache(IServiceCollection, Object, String, Action<HybridCacheOptions>)

Agrega compatibilidad con servicios de almacenamiento en caché de varios niveles con un registro con claves.

AddKeyedHybridCache(IServiceCollection, Object, String)

Agrega compatibilidad con servicios de almacenamiento en caché de varios niveles con un registro con claves.

AddKeyedHybridCache(IServiceCollection, Object)

Agrega compatibilidad con servicios de almacenamiento en caché de varios niveles con un registro con claves.

AddKeyedScoped(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Agrega un servicio con ámbito del tipo especificado en serviceType con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedScoped(IServiceCollection, Type, Object, Type)

Agrega un servicio con ámbito del tipo especificado en serviceType con una implementación del tipo especificado en implementationType al IServiceCollectionespecificado.

AddKeyedScoped(IServiceCollection, Type, Object)

Agrega un servicio con ámbito del tipo especificado en serviceType al IServiceCollectionespecificado.

AddKeyedScoped<TService,TImplementation>(IServiceCollection, Object, Func<IServiceProvider,Object,TImplementation>)

Agrega un servicio con ámbito del tipo especificado en TService con un tipo de implementación especificado en TImplementation mediante el generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedScoped<TService,TImplementation>(IServiceCollection, Object)

Agrega un servicio con ámbito del tipo especificado en TService con un tipo de implementación especificado en TImplementation al IServiceCollectionespecificado.

AddKeyedScoped<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Agrega un servicio con ámbito del tipo especificado en TService con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedScoped<TService>(IServiceCollection, Object)

Agrega un servicio con ámbito del tipo especificado en TService al IServiceCollectionespecificado.

AddKeyedSingleton(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Agrega un servicio singleton del tipo especificado en serviceType con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedSingleton(IServiceCollection, Type, Object, Object)

Agrega un servicio singleton del tipo especificado en serviceType con una instancia especificada en implementationInstance al IServiceCollectionespecificado.

AddKeyedSingleton(IServiceCollection, Type, Object, Type)

Agrega un servicio singleton del tipo especificado en serviceType con una implementación del tipo especificado en implementationType al IServiceCollectionespecificado.

AddKeyedSingleton(IServiceCollection, Type, Object)

Agrega un servicio singleton del tipo especificado en serviceType al IServiceCollectionespecificado.

AddKeyedSingleton<TService,TImplementation>(IServiceCollection, Object, Func<IServiceProvider,Object,TImplementation>)

Agrega un servicio singleton del tipo especificado en TService con un tipo de implementación especificado en TImplementation mediante el generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedSingleton<TService,TImplementation>(IServiceCollection, Object)

Agrega un servicio singleton del tipo especificado en TService con un tipo de implementación especificado en TImplementation al IServiceCollectionespecificado.

AddKeyedSingleton<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Agrega un servicio singleton del tipo especificado en TService con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedSingleton<TService>(IServiceCollection, Object, TService)

Agrega un servicio singleton del tipo especificado en TService con una instancia especificada en implementationInstance al IServiceCollectionespecificado.

AddKeyedSingleton<TService>(IServiceCollection, Object)

Agrega un servicio singleton del tipo especificado en TService al IServiceCollectionespecificado.

AddKeyedTransient(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Agrega un servicio transitorio del tipo especificado en serviceType con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedTransient(IServiceCollection, Type, Object, Type)

Agrega un servicio transitorio del tipo especificado en serviceType con una implementación del tipo especificado en implementationType al IServiceCollectionespecificado.

AddKeyedTransient(IServiceCollection, Type, Object)

Agrega un servicio transitorio del tipo especificado en serviceType al IServiceCollectionespecificado.

AddKeyedTransient<TService,TImplementation>(IServiceCollection, Object, Func<IServiceProvider,Object,TImplementation>)

Agrega un servicio transitorio del tipo especificado en TService con un tipo de implementación especificado en TImplementation mediante el generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedTransient<TService,TImplementation>(IServiceCollection, Object)

Agrega un servicio transitorio del tipo especificado en TService con un tipo de implementación especificado en TImplementation al IServiceCollectionespecificado.

AddKeyedTransient<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Agrega un servicio transitorio del tipo especificado en TService con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddKeyedTransient<TService>(IServiceCollection, Object)

Agrega un servicio transitorio del tipo especificado en TService al IServiceCollectionespecificado.

AddLogging(IServiceCollection, Action<ILoggingBuilder>)

Agrega servicios de registro al IServiceCollectionespecificado.

AddLogging(IServiceCollection)

Agrega servicios de registro al IServiceCollectionespecificado.

AddOptions(IServiceCollection)

Agrega servicios necesarios para usar opciones.

AddOptions<TOptions>(IServiceCollection, String)

Obtiene un generador de opciones que reenvía las llamadas Configure para el mismo TOptions con nombre a la colección de servicios subyacente.

AddOptions<TOptions>(IServiceCollection)

Obtiene un generador de opciones que reenvía las llamadas Configure para el mismo TOptions a la colección de servicios subyacente.

AddOptionsWithValidateOnStart<TOptions,TValidateOptions>(IServiceCollection, String)

Agrega servicios necesarios para usar opciones y aplica la comprobación de validación de opciones en el inicio en lugar de en tiempo de ejecución.

AddOptionsWithValidateOnStart<TOptions>(IServiceCollection, String)

Agrega servicios necesarios para usar opciones y aplica la comprobación de validación de opciones en el inicio en lugar de en tiempo de ejecución.

AddScoped(IServiceCollection, Type, Func<IServiceProvider,Object>)

Agrega un servicio con ámbito del tipo especificado en serviceType con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddScoped(IServiceCollection, Type, Type)

Agrega un servicio con ámbito del tipo especificado en serviceType con una implementación del tipo especificado en implementationType al IServiceCollectionespecificado.

AddScoped(IServiceCollection, Type)

Agrega un servicio con ámbito del tipo especificado en serviceType al IServiceCollectionespecificado.

AddScoped<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

Agrega un servicio con ámbito del tipo especificado en TService con un tipo de implementación especificado en TImplementation mediante el generador especificado en implementationFactory al IServiceCollectionespecificado.

AddScoped<TService,TImplementation>(IServiceCollection)

Agrega un servicio con ámbito del tipo especificado en TService con un tipo de implementación especificado en TImplementation al IServiceCollectionespecificado.

AddScoped<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Agrega un servicio con ámbito del tipo especificado en TService con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddScoped<TService>(IServiceCollection)

Agrega un servicio con ámbito del tipo especificado en TService al IServiceCollectionespecificado.

AddSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>)

Agrega un servicio singleton del tipo especificado en serviceType con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddSingleton(IServiceCollection, Type, Object)

Agrega un servicio singleton del tipo especificado en serviceType con una instancia especificada en implementationInstance al IServiceCollectionespecificado.

AddSingleton(IServiceCollection, Type, Type)

Agrega un servicio singleton del tipo especificado en serviceType con una implementación del tipo especificado en implementationType al IServiceCollectionespecificado.

AddSingleton(IServiceCollection, Type)

Agrega un servicio singleton del tipo especificado en serviceType al IServiceCollectionespecificado.

AddSingleton<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

Agrega un servicio singleton del tipo especificado en TService con un tipo de implementación especificado en TImplementation mediante el generador especificado en implementationFactory al IServiceCollectionespecificado.

AddSingleton<TService,TImplementation>(IServiceCollection)

Agrega un servicio singleton del tipo especificado en TService con un tipo de implementación especificado en TImplementation al IServiceCollectionespecificado.

AddSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Agrega un servicio singleton del tipo especificado en TService con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddSingleton<TService>(IServiceCollection, TService)

Agrega un servicio singleton del tipo especificado en TService con una instancia especificada en implementationInstance al IServiceCollectionespecificado.

AddSingleton<TService>(IServiceCollection)

Agrega un servicio singleton del tipo especificado en TService al IServiceCollectionespecificado.

AddSystemd(IServiceCollection)

Configura la duración del IHost compilado a partir de services a SystemdLifetime, proporciona mensajes de notificación para la aplicación iniciada y detención, y configura el registro de consola en el formato systemd.

AddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>)

Agrega un servicio transitorio del tipo especificado en serviceType con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddTransient(IServiceCollection, Type, Type)

Agrega un servicio transitorio del tipo especificado en serviceType con una implementación del tipo especificado en implementationType al IServiceCollectionespecificado.

AddTransient(IServiceCollection, Type)

Agrega un servicio transitorio del tipo especificado en serviceType al IServiceCollectionespecificado.

AddTransient<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>)

Agrega un servicio transitorio del tipo especificado en TService con un tipo de implementación especificado en TImplementation mediante el generador especificado en implementationFactory al IServiceCollectionespecificado.

AddTransient<TService,TImplementation>(IServiceCollection)

Agrega un servicio transitorio del tipo especificado en TService con un tipo de implementación especificado en TImplementation al IServiceCollectionespecificado.

AddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Agrega un servicio transitorio del tipo especificado en TService con un generador especificado en implementationFactory al IServiceCollectionespecificado.

AddTransient<TService>(IServiceCollection)

Agrega un servicio transitorio del tipo especificado en TService al IServiceCollectionespecificado.

AddWindowsService(IServiceCollection, Action<WindowsServiceLifetimeOptions>)

Configura la duración del IHost compilado a partir de services para WindowsServiceLifetime y habilita el registro en el registro de eventos con el nombre de la aplicación como nombre de origen predeterminado.

AddWindowsService(IServiceCollection)

Configura la duración del IHost compilado a partir de services para WindowsServiceLifetime y habilita el registro en el registro de eventos con el nombre de la aplicación como nombre de origen predeterminado.

BuildServiceProvider(IServiceCollection, Boolean)

Crea un ServiceProvider que contiene los servicios del IServiceCollection proporcionado, opcionalmente, habilitando la validación del ámbito.

BuildServiceProvider(IServiceCollection, ServiceProviderOptions)

Crea un ServiceProvider que contiene los servicios del IServiceCollection proporcionado, opcionalmente, habilitando la validación del ámbito.

BuildServiceProvider(IServiceCollection)

Crea un ServiceProvider que contiene servicios del IServiceCollectionproporcionado.

Configure<TOptions>(IServiceCollection, Action<TOptions>)

Registra una acción que se usa para configurar un tipo determinado de opciones. Nota: Se ejecutan antes de todas las PostConfigure<TOptions>(IServiceCollection, Action<TOptions>).

Configure<TOptions>(IServiceCollection, String, Action<TOptions>)

Registra una acción que se usa para configurar un tipo determinado de opciones. Nota: Se ejecutan antes de todas las PostConfigure<TOptions>(IServiceCollection, Action<TOptions>).

ConfigureAll<TOptions>(IServiceCollection, Action<TOptions>)

Registra una acción que se usa para configurar todas las instancias de un tipo determinado de opciones.

ConfigureOptions(IServiceCollection, Object)

Registra un objeto que tendrá todos sus IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>y IValidateOptions<TOptions> registrados.

ConfigureOptions(IServiceCollection, Type)

Registra un tipo que tendrá todos sus IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>y IValidateOptions<TOptions> registrados.

ConfigureOptions<TConfigureOptions>(IServiceCollection)

Registra un tipo que tendrá todos sus IConfigureOptions<TOptions>, IPostConfigureOptions<TOptions>y IValidateOptions<TOptions> registrados.

PostConfigure<TOptions>(IServiceCollection, Action<TOptions>)

Registra una acción que se usa para inicializar un tipo determinado de opciones. Nota: Estas se ejecutan después de todas las Configure<TOptions>(IServiceCollection, Action<TOptions>).

PostConfigure<TOptions>(IServiceCollection, String, Action<TOptions>)

Registra una acción que se usa para configurar un tipo determinado de opciones. Nota: Estas se ejecutan después de todas las Configure<TOptions>(IServiceCollection, Action<TOptions>).

PostConfigureAll<TOptions>(IServiceCollection, Action<TOptions>)

Registra una acción que se usa para publicar la configuración de todas las instancias de un tipo determinado de opciones. Nota: Estas se ejecutan después de todas las Configure<TOptions>(IServiceCollection, Action<TOptions>).

RemoveAll(IServiceCollection, Type)

Quita todos los servicios de tipo serviceType en IServiceCollection.

RemoveAll<T>(IServiceCollection)

Quita todos los servicios de tipo T en IServiceCollection.

RemoveAllKeyed(IServiceCollection, Type, Object)

Quita todos los servicios de tipo serviceType en IServiceCollection.

RemoveAllKeyed<T>(IServiceCollection, Object)

Quita todos los servicios de tipo T en IServiceCollection.

Replace(IServiceCollection, ServiceDescriptor)

Quita el primer servicio de IServiceCollection con el mismo tipo de servicio que descriptor y agrega descriptor a la colección.

TryAdd(IServiceCollection, IEnumerable<ServiceDescriptor>)

Agrega el descriptors especificado al collection si el tipo de servicio aún no se ha registrado.

TryAdd(IServiceCollection, ServiceDescriptor)

Agrega el descriptor especificado al collection si el tipo de servicio aún no se ha registrado.

TryAddEnumerable(IServiceCollection, IEnumerable<ServiceDescriptor>)

Agrega los ServiceDescriptorespecificados si un descriptor existente con la misma ServiceType y una implementación que aún no existe en services.

TryAddEnumerable(IServiceCollection, ServiceDescriptor)

Agrega un ServiceDescriptor si un descriptor existente con el mismo ServiceType y una implementación que aún no existe en services.

TryAddKeyedScoped(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Agrega el service especificado como un servicio de Scoped mediante el generador especificado en implementationFactory a la collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedScoped(IServiceCollection, Type, Object, Type)

Agrega el service especificado como un servicio de Scoped con la implementación de implementationType al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedScoped(IServiceCollection, Type, Object)

Agrega el service especificado como un servicio de Scoped al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedScoped<TService,TImplementation>(IServiceCollection, Object)

Agrega el TService especificado como un tipo de implementación de servicio de Scoped especificado en TImplementation al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedScoped<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Agrega el TService especificado como un servicio de Scoped mediante el generador especificado en implementationFactory a la services si el tipo de servicio aún no se ha registrado.

TryAddKeyedScoped<TService>(IServiceCollection, Object)

Agrega el TService especificado como un servicio de Scoped al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedSingleton(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Agrega el service especificado como un servicio de Singleton mediante el generador especificado en implementationFactory a la collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedSingleton(IServiceCollection, Type, Object, Type)

Agrega el service especificado como un servicio de Singleton con la implementación de implementationType al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedSingleton(IServiceCollection, Type, Object)

Agrega el service especificado como un servicio de Singleton al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedSingleton<TService,TImplementation>(IServiceCollection, Object)

Agrega el TService especificado como un tipo de implementación de servicio de Singleton especificado en TImplementation al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedSingleton<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Agrega el TService especificado como un servicio de Singleton mediante el generador especificado en implementationFactory a la services si el tipo de servicio aún no se ha registrado.

TryAddKeyedSingleton<TService>(IServiceCollection, Object, TService)

Agrega el TService especificado como un servicio de Singleton con una instancia especificada en instance al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedSingleton<TService>(IServiceCollection, Object)

Agrega el TService especificado como un servicio de Singleton al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedTransient(IServiceCollection, Type, Object, Func<IServiceProvider,Object,Object>)

Agrega el service especificado como un servicio de Transient mediante el generador especificado en implementationFactory a la collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedTransient(IServiceCollection, Type, Object, Type)

Agrega el service especificado como un servicio de Transient con la implementación de implementationType al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedTransient(IServiceCollection, Type, Object)

Agrega el service especificado como un servicio de Transient al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedTransient<TService,TImplementation>(IServiceCollection, Object)

Agrega el TService especificado como un tipo de implementación de servicio de Transient especificado en TImplementation al collection si el tipo de servicio aún no se ha registrado.

TryAddKeyedTransient<TService>(IServiceCollection, Object, Func<IServiceProvider,Object,TService>)

Agrega el TService especificado como un servicio de Transient mediante el generador especificado en implementationFactory a la services si el tipo de servicio aún no se ha registrado.

TryAddKeyedTransient<TService>(IServiceCollection, Object)

Agrega el TService especificado como un servicio de Transient al collection si el tipo de servicio aún no se ha registrado.

TryAddScoped(IServiceCollection, Type, Func<IServiceProvider,Object>)

Agrega el service especificado como un servicio de Scoped mediante el generador especificado en implementationFactory a la collection si el tipo de servicio aún no se ha registrado.

TryAddScoped(IServiceCollection, Type, Type)

Agrega el service especificado como un servicio de Scoped con la implementación de implementationType al collection si el tipo de servicio aún no se ha registrado.

TryAddScoped(IServiceCollection, Type)

Agrega el service especificado como un servicio de Scoped al collection si el tipo de servicio aún no se ha registrado.

TryAddScoped<TService,TImplementation>(IServiceCollection)

Agrega el TService especificado como un tipo de implementación de servicio de Scoped especificado en TImplementation al collection si el tipo de servicio aún no se ha registrado.

TryAddScoped<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Agrega el TService especificado como un servicio de Scoped mediante el generador especificado en implementationFactory a la services si el tipo de servicio aún no se ha registrado.

TryAddScoped<TService>(IServiceCollection)

Agrega el TService especificado como un servicio de Scoped al collection si el tipo de servicio aún no se ha registrado.

TryAddSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>)

Agrega el service especificado como un servicio de Singleton mediante el generador especificado en implementationFactory a la collection si el tipo de servicio aún no se ha registrado.

TryAddSingleton(IServiceCollection, Type, Type)

Agrega el service especificado como un servicio de Singleton con la implementación de implementationType al collection si el tipo de servicio aún no se ha registrado.

TryAddSingleton(IServiceCollection, Type)

Agrega el service especificado como un servicio de Singleton al collection si el tipo de servicio aún no se ha registrado.

TryAddSingleton<TService,TImplementation>(IServiceCollection)

Agrega el TService especificado como un tipo de implementación de servicio de Singleton especificado en TImplementation al collection si el tipo de servicio aún no se ha registrado.

TryAddSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Agrega el TService especificado como un servicio de Singleton mediante el generador especificado en implementationFactory a la services si el tipo de servicio aún no se ha registrado.

TryAddSingleton<TService>(IServiceCollection, TService)

Agrega el TService especificado como un servicio de Singleton con una instancia especificada en instance al collection si el tipo de servicio aún no se ha registrado.

TryAddSingleton<TService>(IServiceCollection)

Agrega el TService especificado como un servicio de Singleton al collection si el tipo de servicio aún no se ha registrado.

TryAddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>)

Agrega el service especificado como un servicio de Transient mediante el generador especificado en implementationFactory a la collection si el tipo de servicio aún no se ha registrado.

TryAddTransient(IServiceCollection, Type, Type)

Agrega el service especificado como un servicio de Transient con la implementación de implementationType al collection si el tipo de servicio aún no se ha registrado.

TryAddTransient(IServiceCollection, Type)

Agrega el service especificado como un servicio de Transient al collection si el tipo de servicio aún no se ha registrado.

TryAddTransient<TService,TImplementation>(IServiceCollection)

Agrega el TService especificado como un tipo de implementación de servicio de Transient especificado en TImplementation al collection si el tipo de servicio aún no se ha registrado.

TryAddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>)

Agrega el TService especificado como un servicio de Transient mediante el generador especificado en implementationFactory a la services si el tipo de servicio aún no se ha registrado.

TryAddTransient<TService>(IServiceCollection)

Agrega el TService especificado como un servicio de Transient al collection si el tipo de servicio aún no se ha registrado.

Se aplica a