次の方法で共有


InferParameterBindingInfoConvention クラス

定義

パラメーターのBindingSourceを推論するIActionModelConvention

public ref class InferParameterBindingInfoConvention : Microsoft::AspNetCore::Mvc::ApplicationModels::IActionModelConvention
public class InferParameterBindingInfoConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention
type InferParameterBindingInfoConvention = class
    interface IActionModelConvention
Public Class InferParameterBindingInfoConvention
Implements IActionModelConvention
継承
InferParameterBindingInfoConvention
実装

注釈

この規則の目的は、直感的で簡単に BindingSource 推論を文書化することです。 ルールは次のとおりです。

  1. 以前に指定された BindingSource が上書きされることはありません。
  2. DI コンテナーに登録されている複合型パラメーター (IsComplexType) は、 Services割り当てられます。
  3. DI コンテナーに登録されていない複合型パラメーター (IsComplexType) は、 Body割り当てられます。
  4. ANY ルート テンプレートでルート値として表示される名前を持つパラメーターは、 Path割り当てられます。
  5. その他のパラメーターはすべて Query です。

コンストラクター

名前 説明
InferParameterBindingInfoConvention(IModelMetadataProvider, IServiceProviderIsService)

InferParameterBindingInfoConvention の新しいインスタンスを初期化します。

InferParameterBindingInfoConvention(IModelMetadataProvider)

InferParameterBindingInfoConvention の新しいインスタンスを初期化します。

メソッド

名前 説明
Apply(ActionModel)

規則を ActionModelに適用するために呼び出されます。

ShouldApply(ActionModel)

アクションを適用するかどうかを判断するために呼び出されます。

適用対象