ServiceManager.GetRequiredService<TServiceType> 메서드

정의

요청된 서비스를 검색합니다.

public:
generic <typename TServiceType>
 TServiceType GetRequiredService();
public TServiceType GetRequiredService<TServiceType>();
member this.GetRequiredService : unit -> 'ServiceType
Public Function GetRequiredService(Of TServiceType) () As TServiceType

형식 매개 변수

TServiceType

검색할 서비스의 유형입니다.

반품

TServiceType

서비스의 인스턴스인 제네릭 형식입니다.

예외

지정된 형식의 서비스가 없습니다.

설명

달리 GetService, 이 메서드는 서비스를 사용할 수 없는 경우를 NotSupportedException throw합니다.

적용 대상