IServiceProviderEx.GetService 메서드

정의

받을 서비스 객체 유형을 지정하는 객체를 초기화합니다.

오버로드

Name Description
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의 서비스 객체입니다.

적용 대상