다음을 통해 공유


AsyncServiceProviderInjection<TService,TInterface>.GetServiceAsync 메서드

정의

오버로드

GetServiceAsync()

검색된 서비스를 비동기적으로 반환합니다.

GetServiceAsync(Boolean)

검색된 서비스를 비동기적으로 반환합니다.

GetServiceAsync()

검색된 서비스를 비동기적으로 반환합니다.

public System.Threading.Tasks.Task<TInterface> GetServiceAsync();
member this.GetServiceAsync : unit -> System.Threading.Tasks.Task<'Interface (requires 'Interface : null)>
Public Function GetServiceAsync () As Task(Of TInterface)

반환

Task<TInterface>

서비스의 instanceTService.

예외

사용 가능한 유형의 TService 서비스가 없는 경우

설명

이 메서드에 대한 여러 호출은 의 동일한 instance TInterface반환합니다.

적용 대상

GetServiceAsync(Boolean)

검색된 서비스를 비동기적으로 반환합니다.

public System.Threading.Tasks.Task<TInterface?> GetServiceAsync(bool assumePresent);
member this.GetServiceAsync : bool -> System.Threading.Tasks.Task<'Interface (requires 'Interface : null)>
Public Function GetServiceAsync (assumePresent As Boolean) As Task(Of TInterface)

매개 변수

assumePresent
Boolean

반환

Task<TInterface>

서비스의 instanceTService.

예외

assumePresenttrue 고 사용 가능한 유형의 TService 서비스가 없는 경우

설명

이 메서드에 대한 여러 호출은 의 동일한 instance TInterface반환합니다.

적용 대상