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합니다.

적용 대상