ServiceCollectionMap.TryAddScoped 메서드

정의

오버로드

TryAddScoped(Type, Func<IServiceProvider,Object>)

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 팩터리에서 구현된 서비스를 추가합니다.

TryAddScoped(Type, Type)

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 구체적인 형식으로 구현된 서비스를 추가합니다.

TryAddScoped<TService,TImplementation>()

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 구체적인 형식으로 구현된 서비스를 추가합니다.

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

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 팩터리에서 구현된 서비스를 추가합니다.

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

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 팩터리에서 구현된 서비스를 추가합니다.

TryAddScoped(Type, Func<IServiceProvider,Object>)

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 팩터리에서 구현된 서비스를 추가합니다.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddScoped (Type serviceType, Func<IServiceProvider,object> factory);
abstract member TryAddScoped : Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddScoped : Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddScoped (serviceType As Type, factory As Func(Of IServiceProvider, Object)) As ServiceCollectionMap

매개 변수

serviceType
Type

서비스에 대한 계약입니다.

factory
Func<IServiceProvider,Object>

서비스를 구현하는 팩터리입니다.

반환

추가 호출을 연결할 수 있는 맵입니다.

적용 대상

TryAddScoped(Type, Type)

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 구체적인 형식으로 구현된 서비스를 추가합니다.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddScoped (Type serviceType, Type implementationType);
abstract member TryAddScoped : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
override this.TryAddScoped : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap
Public Overridable Function TryAddScoped (serviceType As Type, implementationType As Type) As ServiceCollectionMap

매개 변수

serviceType
Type

서비스에 대한 계약입니다.

implementationType
Type

서비스를 구현하는 구체적인 형식입니다.

반환

추가 호출을 연결할 수 있는 맵입니다.

적용 대상

TryAddScoped<TService,TImplementation>()

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 구체적인 형식으로 구현된 서비스를 추가합니다.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddScoped<TService,TImplementation> () where TService : class where TImplementation : class, TService;
abstract member TryAddScoped : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddScoped : unit -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddScoped(Of TService As Class, TImplementation As Class) () As ServiceCollectionMap

형식 매개 변수

TService

서비스에 대한 계약입니다.

TImplementation

서비스를 구현하는 구체적인 형식입니다.

반환

추가 호출을 연결할 수 있는 맵입니다.

적용 대상

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

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 팩터리에서 구현된 서비스를 추가합니다.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddScoped<TService,TImplementation> (Func<IServiceProvider,TImplementation> factory) where TService : class where TImplementation : class, TService;
abstract member TryAddScoped : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddScoped : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddScoped(Of TService As Class, TImplementation As Class) (factory As Func(Of IServiceProvider, TImplementation)) As ServiceCollectionMap

형식 매개 변수

TService

서비스에 대한 계약입니다.

TImplementation

지정된 팩터리에서 만드는 구체적인 형식입니다.

매개 변수

factory
Func<IServiceProvider,TImplementation>

서비스를 구현하는 팩터리입니다.

반환

추가 호출을 연결할 수 있는 맵입니다.

적용 대상

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

Scoped 지정된 서비스 유형에 대한 서비스가 이미 등록되지 않은 경우 지정된 팩터리에서 구현된 서비스를 추가합니다.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap TryAddScoped<TService> (Func<IServiceProvider,TService> factory) where TService : class;
abstract member TryAddScoped : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
override this.TryAddScoped : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.EntityFrameworkCore.Infrastructure.ServiceCollectionMap (requires 'Service : null)
Public Overridable Function TryAddScoped(Of TService As Class) (factory As Func(Of IServiceProvider, TService)) As ServiceCollectionMap

형식 매개 변수

TService

서비스에 대한 계약입니다.

매개 변수

factory
Func<IServiceProvider,TService>

서비스를 구현하는 팩터리입니다.

반환

추가 호출을 연결할 수 있는 맵입니다.

적용 대상