AssociatedValidatorProvider.GetValidators Methode

Definition

Ruft die Validatoren für das Modell ab.

Überlädt

Name Beschreibung
GetValidators(ModelMetadata, ModelBindingExecutionContext)

Ruft die Validatoren für das Modell mithilfe des angegebenen Metadaten- und Ausführungskontexts ab.

GetValidators(ModelMetadata, ModelBindingExecutionContext, IEnumerable<Attribute>)

Ruft bei der Implementierung in einem abgeleiteten Typ die Validatoren für das Modell mithilfe der angegebenen Metadaten, des Ausführungskontexts und der Attribute ab.

GetValidators(ModelMetadata, ModelBindingExecutionContext)

Ruft die Validatoren für das Modell mithilfe des angegebenen Metadaten- und Ausführungskontexts ab.

public:
 override System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context);
public override sealed System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators(System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context);
override this.GetValidators : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext -> seq<System.Web.ModelBinding.ModelValidator>
Public Overrides NotOverridable Function GetValidators (metadata As ModelMetadata, context As ModelBindingExecutionContext) As IEnumerable(Of ModelValidator)

Parameter

metadata
ModelMetadata

Die Metadaten.

context
ModelBindingExecutionContext

Der Ausführungskontext.

Gibt zurück

Die Validatoren.

Ausnahmen

Der metadata Parameter ist contextnull.

Der Eigenschaftenname in den Metadaten verweist nicht auf eine der Eigenschaften des Containertyps.

Gilt für:

GetValidators(ModelMetadata, ModelBindingExecutionContext, IEnumerable<Attribute>)

Ruft bei der Implementierung in einem abgeleiteten Typ die Validatoren für das Modell mithilfe der angegebenen Metadaten, des Ausführungskontexts und der Attribute ab.

protected:
 abstract System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context, System::Collections::Generic::IEnumerable<Attribute ^> ^ attributes);
protected abstract System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators(System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context, System.Collections.Generic.IEnumerable<Attribute> attributes);
override this.GetValidators : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext * seq<Attribute> -> seq<System.Web.ModelBinding.ModelValidator>
Protected MustOverride Function GetValidators (metadata As ModelMetadata, context As ModelBindingExecutionContext, attributes As IEnumerable(Of Attribute)) As IEnumerable(Of ModelValidator)

Parameter

metadata
ModelMetadata

Die Metadaten.

context
ModelBindingExecutionContext

Der Ausführungskontext.

attributes
IEnumerable<Attribute>

Die Attribute.

Gibt zurück

Die Validatoren.

Gilt für: