다음을 통해 공유


IServiceProviderEx.GetService 메서드

정의

가져올 서비스 개체 유형을 지정하는 개체를 초기화합니다.

오버로드

GetService<T>()

가져올 서비스 개체 유형을 지정하는 개체를 검색합니다.

GetService<T>(Boolean)

가져올 서비스 개체의 유형을 나타내는 값을 지정합니다.

GetService<T>()

가져올 서비스 개체 유형을 지정하는 개체를 검색합니다.

public:
generic <typename T>
 T GetService();
public T GetService<T> ();
abstract member GetService : unit -> 'T
Public Function GetService(Of T) () As T

형식 매개 변수

T

서비스 개체의 형식입니다.

반환

T

가져올 지정된 서비스 개체 형식입니다.

적용 대상

GetService<T>(Boolean)

가져올 서비스 개체의 유형을 나타내는 값을 지정합니다.

public:
generic <typename T>
 T GetService(bool throwIfNotFound);
public T GetService<T> (bool throwIfNotFound);
abstract member GetService : bool -> 'T
Public Function GetService(Of T) (throwIfNotFound As Boolean) As T

형식 매개 변수

T

제네릭 형식 값입니다.

매개 변수

throwIfNotFound
Boolean

서비스를 찾을 수 없으면 true이고, 그렇지 않으면 false입니다.

반환

T

serviceType 유형의 서비스 개체입니다.

적용 대상