ServiceCollectionDescriptorExtensions.TryAdd メソッド

定義

オーバーロード

TryAdd(IServiceCollection, ServiceDescriptor)

サービスの種類がまだ登録されていない場合、指定の descriptorcollection に追加します。

TryAdd(IServiceCollection, IEnumerable<ServiceDescriptor>)

サービスの種類がまだ登録されていない場合、指定の descriptorscollection に追加します。

TryAdd(IServiceCollection, ServiceDescriptor)

ソース:
ServiceCollectionDescriptorExtensions.cs
ソース:
ServiceCollectionDescriptorExtensions.cs
ソース:
ServiceCollectionDescriptorExtensions.cs

サービスの種類がまだ登録されていない場合、指定の descriptorcollection に追加します。

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)

パラメーター

descriptor
ServiceDescriptor

追加する ServiceDescriptor

適用対象

TryAdd(IServiceCollection, IEnumerable<ServiceDescriptor>)

ソース:
ServiceCollectionDescriptorExtensions.cs
ソース:
ServiceCollectionDescriptorExtensions.cs
ソース:
ServiceCollectionDescriptorExtensions.cs

サービスの種類がまだ登録されていない場合、指定の descriptorscollection に追加します。

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))

パラメーター

descriptors
IEnumerable<ServiceDescriptor>

追加する ServiceDescriptor

適用対象