BindPropertyAttribute 類別

定義

屬性,可以指定要用於系結相關聯屬性的模型名稱或型 IModelBinder 別。

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
繼承
BindPropertyAttribute
屬性
實作

備註

類似於 ModelBinderAttribute。 不同于該屬性, BindPropertyAttribute 僅適用于屬性,並新增 IRequestPredicateProvider 實作,預設表示屬性不應系結至 HTTP GET 要求, (另 SupportsGet 請參閱) 。

建構函式

BindPropertyAttribute()

屬性,可以指定要用於系結相關聯屬性的模型名稱或型 IModelBinder 別。

屬性

BinderType

Type 實作其中一個 IModelBinder

BindingSource

取得 BindingSource

Name

模型名稱。

SupportsGet

取得或設定關聯屬性應該系結在 HTTP GET 要求中的指示。 如果 true 為 ,則屬性應該系結于所有要求中。 否則,屬性不應該系結在 HTTP GET 要求中。

明確介面實作

IRequestPredicateProvider.RequestPredicate

屬性,可以指定要用於系結相關聯屬性的模型名稱或型 IModelBinder 別。

適用於