ValidationContext.GetService(Type) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
사용자 지정 유효성 검사를 제공하는 서비스를 반환합니다.
public:
virtual System::Object ^ GetService(Type ^ serviceType);
public object GetService(Type serviceType);
abstract member GetService : Type -> obj
override this.GetService : Type -> obj
Public Function GetService (serviceType As Type) As Object
매개 변수
- serviceType
- Type
유효성 검사에 사용할 서비스의 형식입니다.
반품
서비스의 인스턴스이거나 null 서비스를 사용할 수 없는 경우
구현
설명
개체가 ServiceContainer 애플리케이션 수준에서 정의된 경우 메서드는 GetService 개체에 액세스하여 요청된 서비스를 검색합니다.
개체가 ServiceContainer 정의되지 않았거나 서비스를 반환하지 않는 경우 메서드는 서비스를 GetService 가져오기 위해 메서드에 ValidationContext 전달된 개체를 쿼리 IServiceProvider 합니다.