ModelBinderProviderCollection.RegisterBinderForGenericType 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為一般型別新增模型綁定器提供者。
多載
| 名稱 | Description |
|---|---|
| RegisterBinderForGenericType(Type, Func<Type[],IModelBinder>) |
透過指定的模型類型與模型綁定器工廠,為通用型態新增模型綁定器。 |
| RegisterBinderForGenericType(Type, Type) |
透過使用指定的模型類型與模型綁定器類型,為一般型態新增模型綁定器提供者。 |
| RegisterBinderForGenericType(Type, IModelBinder) |
透過使用指定的模型類型與模型綁定器,為一般型態新增模型綁定器提供者。 |
RegisterBinderForGenericType(Type, Func<Type[],IModelBinder>)
透過指定的模型類型與模型綁定器工廠,為通用型態新增模型綁定器。
public:
void RegisterBinderForGenericType(Type ^ modelType, Func<cli::array <Type ^> ^, System::Web::ModelBinding::IModelBinder ^> ^ modelBinderFactory);
public void RegisterBinderForGenericType(Type modelType, Func<Type[],System.Web.ModelBinding.IModelBinder> modelBinderFactory);
member this.RegisterBinderForGenericType : Type * Func<Type[], System.Web.ModelBinding.IModelBinder> -> unit
Public Sub RegisterBinderForGenericType (modelType As Type, modelBinderFactory As Func(Of Type(), IModelBinder))
參數
- modelType
- Type
型號類型。
- modelBinderFactory
- Func<Type[],IModelBinder>
模型活頁機工廠。
適用於
RegisterBinderForGenericType(Type, Type)
透過使用指定的模型類型與模型綁定器類型,為一般型態新增模型綁定器提供者。
public:
void RegisterBinderForGenericType(Type ^ modelType, Type ^ modelBinderType);
public void RegisterBinderForGenericType(Type modelType, Type modelBinderType);
member this.RegisterBinderForGenericType : Type * Type -> unit
Public Sub RegisterBinderForGenericType (modelType As Type, modelBinderType As Type)
參數
- modelType
- Type
型號類型。
- modelBinderType
- Type
模型活頁夾類型。
適用於
RegisterBinderForGenericType(Type, IModelBinder)
透過使用指定的模型類型與模型綁定器,為一般型態新增模型綁定器提供者。
public:
void RegisterBinderForGenericType(Type ^ modelType, System::Web::ModelBinding::IModelBinder ^ modelBinder);
public void RegisterBinderForGenericType(Type modelType, System.Web.ModelBinding.IModelBinder modelBinder);
member this.RegisterBinderForGenericType : Type * System.Web.ModelBinding.IModelBinder -> unit
Public Sub RegisterBinderForGenericType (modelType As Type, modelBinder As IModelBinder)
參數
- modelType
- Type
型號類型。
- modelBinder
- IModelBinder
模型活頁夾。