ServiceCollectionDescriptorExtensions.Add Метод

Определение

Перегрузки

Add(IServiceCollection, ServiceDescriptor)

Добавляет заданный объект descriptor в collection.Adds the specified descriptor to the collection.

Add(IServiceCollection, IEnumerable<ServiceDescriptor>)

Добавляет последовательность ServiceDescriptor в collection.Adds a sequence of ServiceDescriptor to the collection.

Add(IServiceCollection, ServiceDescriptor)

Добавляет заданный объект descriptor в collection.Adds the specified descriptor to the 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

Параметры

descriptor
ServiceDescriptor

Добавляемый объект ServiceDescriptor.The ServiceDescriptor to add.

Возвращаемое значение

IServiceCollection

Ссылка на текущий экземпляр IServiceCollection.A reference to the current instance of IServiceCollection.

Применяется к

Add(IServiceCollection, IEnumerable<ServiceDescriptor>)

Добавляет последовательность ServiceDescriptor в collection.Adds a sequence of ServiceDescriptor to the 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

Параметры

descriptors
IEnumerable<ServiceDescriptor>

Добавляемые ServiceDescriptor.The ServiceDescriptors to add.

Возвращаемое значение

IServiceCollection

Ссылка на текущий экземпляр IServiceCollection.A reference to the current instance of IServiceCollection.

Применяется к