ServiceCollectionDescriptorExtensions.Add Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
Add(IServiceCollection, ServiceDescriptor) |
Agrega el objeto |
Add(IServiceCollection, IEnumerable<ServiceDescriptor>) |
Agrega una secuencia de ServiceDescriptor a |
Add(IServiceCollection, ServiceDescriptor)
Agrega el objeto descriptor
especificado a la colección collection
.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ Add(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection, Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ descriptor);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Add (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor);
static member Add : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.DependencyInjection.ServiceDescriptor -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function Add (collection As IServiceCollection, descriptor As ServiceDescriptor) As IServiceCollection
Parámetros
- collection
- IServiceCollection
- descriptor
- ServiceDescriptor
ServiceDescriptor que se va a agregar.
Devoluciones
Una referencia a la instancia actual de IServiceCollection.
Se aplica a
Add(IServiceCollection, IEnumerable<ServiceDescriptor>)
Agrega una secuencia de ServiceDescriptor a collection
.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ Add(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection, System::Collections::Generic::IEnumerable<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^> ^ descriptors);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Add (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyInjection.ServiceDescriptor> descriptors);
static member Add : Microsoft.Extensions.DependencyInjection.IServiceCollection * seq<Microsoft.Extensions.DependencyInjection.ServiceDescriptor> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function Add (collection As IServiceCollection, descriptors As IEnumerable(Of ServiceDescriptor)) As IServiceCollection
Parámetros
- collection
- IServiceCollection
- descriptors
- IEnumerable<ServiceDescriptor>
Las instancias de ServiceDescriptor que se van a agregar.
Devoluciones
Una referencia a la instancia actual de IServiceCollection.