BindPropertyAttribute Třída

Definice

Atribut, který může zadat název modelu nebo typ IModelBinder použití pro vazbu přidružené vlastnosti.

public ref class BindPropertyAttribute : Attribute, Microsoft::AspNetCore::Mvc::ModelBinding::IBinderTypeProviderMetadata, Microsoft::AspNetCore::Mvc::ModelBinding::IModelNameProvider, Microsoft::AspNetCore::Mvc::ModelBinding::IRequestPredicateProvider
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class BindPropertyAttribute : Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IRequestPredicateProvider
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindPropertyAttribute = class
    inherit Attribute
    interface IModelNameProvider
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IRequestPredicateProvider
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type BindPropertyAttribute = class
    inherit Attribute
    interface IBinderTypeProviderMetadata
    interface IBindingSourceMetadata
    interface IModelNameProvider
    interface IRequestPredicateProvider
Public Class BindPropertyAttribute
Inherits Attribute
Implements IBinderTypeProviderMetadata, IModelNameProvider, IRequestPredicateProvider
Dědičnost
BindPropertyAttribute
Atributy
Implementuje

Poznámky

Podobá se ModelBinderAttribute. Na rozdíl od daného atributu BindPropertyAttribute platí pouze pro vlastnosti a přidává IRequestPredicateProvider implementaci, která ve výchozím nastavení označuje, že vlastnost by neměla být vázána na požadavky HTTP GET (viz také SupportsGet).

Konstruktory

BindPropertyAttribute()

Vlastnosti

BinderType

A Type , která implementuje buď IModelBinder.

BindingSource

Získá .BindingSource

Name

Název modelu.

SupportsGet

Získá nebo nastaví indikaci přidružené vlastnosti by měla být vázána v požadavcích HTTP GET. Pokud trueby vlastnost měla být vázána ve všech požadavcích. Jinak by vlastnost neměla být vázána v požadavcích HTTP GET.

Explicitní implementace rozhraní

IRequestPredicateProvider.RequestPredicate

Platí pro