Aracılığıyla paylaş


ServiceCollectionDescriptorExtensions.TryAdd Yöntem

Tanım

Aşırı Yüklemeler

TryAdd(IServiceCollection, ServiceDescriptor)

Hizmet türü henüz kaydedilmediyse belirtilen descriptorcollection değerini öğesine ekler.

TryAdd(IServiceCollection, IEnumerable<ServiceDescriptor>)

Hizmet türü henüz kaydedilmediyse belirtilen descriptorscollection değerini öğesine ekler.

TryAdd(IServiceCollection, ServiceDescriptor)

Kaynak:
ServiceCollectionDescriptorExtensions.cs
Kaynak:
ServiceCollectionDescriptorExtensions.cs

Hizmet türü henüz kaydedilmediyse belirtilen descriptorcollection değerini öğesine ekler.

public:
[System::Runtime::CompilerServices::Extension]
 static void TryAdd(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection, Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ descriptor);
public static void TryAdd (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor);
static member TryAdd : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.DependencyInjection.ServiceDescriptor -> unit
<Extension()>
Public Sub TryAdd (collection As IServiceCollection, descriptor As ServiceDescriptor)

Parametreler

descriptor
ServiceDescriptor

ServiceDescriptor Eklenecek.

Şunlara uygulanır

TryAdd(IServiceCollection, IEnumerable<ServiceDescriptor>)

Kaynak:
ServiceCollectionDescriptorExtensions.cs
Kaynak:
ServiceCollectionDescriptorExtensions.cs

Hizmet türü henüz kaydedilmediyse belirtilen descriptorscollection değerini öğesine ekler.

public:
[System::Runtime::CompilerServices::Extension]
 static void TryAdd(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ collection, System::Collections::Generic::IEnumerable<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^> ^ descriptors);
public static void TryAdd (this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyInjection.ServiceDescriptor> descriptors);
static member TryAdd : Microsoft.Extensions.DependencyInjection.IServiceCollection * seq<Microsoft.Extensions.DependencyInjection.ServiceDescriptor> -> unit
<Extension()>
Public Sub TryAdd (collection As IServiceCollection, descriptors As IEnumerable(Of ServiceDescriptor))

Parametreler

Şunlara uygulanır