ValidationContext 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
ValidationContext 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| ValidationContext(Object) |
지정된 개체 인스턴스를 사용하여 클래스의 ValidationContext 새 인스턴스를 초기화합니다. |
| ValidationContext(Object, IDictionary<Object,Object>) |
지정된 개체와 선택적 속성 모음을 사용하여 클래스의 ValidationContext 새 인스턴스를 초기화합니다. |
| ValidationContext(Object, IServiceProvider, IDictionary<Object,Object>) |
서비스 공급자 및 서비스 소비자 사전을 ValidationContext 사용하여 클래스의 새 인스턴스를 초기화합니다. |
| ValidationContext(Object, String, IServiceProvider, IDictionary<Object,Object>) |
ValidationContext 지정된 개체 인스턴스 |
ValidationContext(Object)
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
지정된 개체 인스턴스를 사용하여 클래스의 ValidationContext 새 인스턴스를 초기화합니다.
public:
ValidationContext(System::Object ^ instance);
public ValidationContext(object instance);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")]
public ValidationContext(object instance);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered.")]
public ValidationContext(object instance);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")]
public ValidationContext(object instance);
new System.ComponentModel.DataAnnotations.ValidationContext : obj -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj -> System.ComponentModel.DataAnnotations.ValidationContext
Public Sub New (instance As Object)
매개 변수
- instance
- Object
유효성을 검사할 개체 인스턴스입니다.
null수 없습니다.
- 특성
예외
instance은 null입니다.
적용 대상
ValidationContext(Object, IDictionary<Object,Object>)
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
지정된 개체와 선택적 속성 모음을 사용하여 클래스의 ValidationContext 새 인스턴스를 초기화합니다.
public:
ValidationContext(System::Object ^ instance, System::Collections::Generic::IDictionary<System::Object ^, System::Object ^> ^ items);
public ValidationContext(object instance, System.Collections.Generic.IDictionary<object,object> items);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")]
public ValidationContext(object instance, System.Collections.Generic.IDictionary<object,object?>? items);
public ValidationContext(object instance, System.Collections.Generic.IDictionary<object,object?>? items);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered.")]
public ValidationContext(object instance, System.Collections.Generic.IDictionary<object,object?>? items);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")]
public ValidationContext(object instance, System.Collections.Generic.IDictionary<object,object?>? items);
new System.ComponentModel.DataAnnotations.ValidationContext : obj * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
Public Sub New (instance As Object, items As IDictionary(Of Object, Object))
매개 변수
- instance
- Object
유효성을 검사할 개체 인스턴스입니다.
null수 없습니다.
- items
- IDictionary<Object,Object>
소비자가 사용할 수 있도록 하는 선택적 키/값 쌍 집합입니다.
- 특성
예외
instance은 null입니다.
설명
이 items경우 null 빈 사전이 만들어집니다. null이 아닌 경우 items 키/값 쌍 집합이 새 사전에 복사되어 소비자가 원래 사전을 수정할 수 없습니다.
적용 대상
ValidationContext(Object, IServiceProvider, IDictionary<Object,Object>)
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
서비스 공급자 및 서비스 소비자 사전을 ValidationContext 사용하여 클래스의 새 인스턴스를 초기화합니다.
public:
ValidationContext(System::Object ^ instance, IServiceProvider ^ serviceProvider, System::Collections::Generic::IDictionary<System::Object ^, System::Object ^> ^ items);
public ValidationContext(object instance, IServiceProvider serviceProvider, System.Collections.Generic.IDictionary<object,object> items);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")]
public ValidationContext(object instance, IServiceProvider? serviceProvider, System.Collections.Generic.IDictionary<object,object?>? items);
public ValidationContext(object instance, IServiceProvider? serviceProvider, System.Collections.Generic.IDictionary<object,object?>? items);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered.")]
public ValidationContext(object instance, IServiceProvider? serviceProvider, System.Collections.Generic.IDictionary<object,object?>? items);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")]
public ValidationContext(object instance, IServiceProvider? serviceProvider, System.Collections.Generic.IDictionary<object,object?>? items);
new System.ComponentModel.DataAnnotations.ValidationContext : obj * IServiceProvider * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj * IServiceProvider * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj * IServiceProvider * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of instance cannot be statically discovered and the Type's properties can be trimmed.")>]
new System.ComponentModel.DataAnnotations.ValidationContext : obj * IServiceProvider * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
Public Sub New (instance As Object, serviceProvider As IServiceProvider, items As IDictionary(Of Object, Object))
매개 변수
- instance
- Object
유효성을 검사할 개체입니다. 이 매개 변수는 필수입니다.
- serviceProvider
- IServiceProvider
인터페이스를 구현하는 개체입니다 IServiceProvider . 이 매개 변수는 선택 사항입니다.
- items
- IDictionary<Object,Object>
서비스 소비자가 사용할 수 있도록 하는 키/값 쌍의 사전입니다. 이 매개 변수는 선택 사항입니다.
- 특성
예외
instance은 null입니다.
설명
매개 변수는 serviceProvider 사용자 지정 유효성 검사를 수행하기 위해 메서드에서 사용할 GetService 수 있는 서비스를 나타냅니다.
매개 변수가 itemsnull있으면 빈 사전이 만들어집니다. 매개 변수가 없 null으면 키/값 쌍 집합이 새 사전에 복사되므로 서비스 소비자가 원래 사전을 수정할 수 없습니다.
적용 대상
ValidationContext(Object, String, IServiceProvider, IDictionary<Object,Object>)
- Source:
- ValidationContext.cs
- Source:
- ValidationContext.cs
ValidationContext 지정된 개체 인스턴스displayName에 대해 선택적 및 선택serviceProvider적 속성 모음items을 사용하여 생성합니다.
public:
ValidationContext(System::Object ^ instance, System::String ^ displayName, IServiceProvider ^ serviceProvider, System::Collections::Generic::IDictionary<System::Object ^, System::Object ^> ^ items);
public ValidationContext(object instance, string displayName, IServiceProvider? serviceProvider, System.Collections.Generic.IDictionary<object,object?>? items);
new System.ComponentModel.DataAnnotations.ValidationContext : obj * string * IServiceProvider * System.Collections.Generic.IDictionary<obj, obj> -> System.ComponentModel.DataAnnotations.ValidationContext
Public Sub New (instance As Object, displayName As String, serviceProvider As IServiceProvider, items As IDictionary(Of Object, Object))
매개 변수
- instance
- Object
유효성을 검사할 개체 인스턴스입니다.
null수 없습니다.
- displayName
- String
개체 인스턴스와 연결된 표시 이름입니다.
- serviceProvider
- IServiceProvider
호출할 때 GetService(Type) 사용할 선택 사항 IServiceProvider 입니다.
이 nullGetService(Type) 경우 항상 반환null됩니다.
- items
- IDictionary<Object,Object>
를 통해 Items소비자가 사용할 수 있도록 하는 선택적 키/값 쌍 집합입니다.
이 경우 null빈 사전이 만들어집니다. 그렇지 않은 null경우 키/값 쌍 집합이 새 사전에 복사되므로 소비자가 원래 사전을 수정할 수 없습니다.
예외
시기 instancenull
설명
이 생성자는 리플렉션을 사용하여 DisplayName 설정을 지원하는 형식 instance 을 해결하지 않으므로 트리밍이 안전합니다.