ViewDataDictionary コンストラクター

定義

オーバーロード

ViewDataDictionary(ViewDataDictionary)

既存のインスタンスに完全に基づいて、 ViewDataDictionary クラスの新しいインスタンスを初期化します。

ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary)

ViewDataDictionary クラスの新しいインスタンスを初期化します。

ViewDataDictionary(IModelMetadataProvider, Type)

ViewDataDictionary クラスの新しいインスタンスを初期化します。

ViewDataDictionary(ViewDataDictionary, Type)

既存のインスタンスの一部に ViewDataDictionary 基づいて、 クラスの新しいインスタンスを初期化します。

ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary, Type)

ViewDataDictionary クラスの新しいインスタンスを初期化します。

ViewDataDictionary(ViewDataDictionary, Object, Type)

既存のインスタンスの一部に ViewDataDictionary 基づいて、 クラスの新しいインスタンスを初期化します。 このコンストラクターは、 が の場合に例外SetModel(Object)modelnullスローされないように注意してください。

ViewDataDictionary(ViewDataDictionary)

既存のインスタンスに完全に基づいて、 ViewDataDictionary クラスの新しいインスタンスを初期化します。

public:
 ViewDataDictionary(Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ source);
public ViewDataDictionary (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source);
new Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
Public Sub New (source As ViewDataDictionary)

パラメーター

source
ViewDataDictionary

ViewDataDictionary インスタンスを使用して初期値をコピーします。

注釈

インスタンスをViewDataDictionaryコピーするときに使用するため、インスタンスからViewDataDictionary<TModel>ベース ViewDataDictionary インスタンスにコピーする場合など、宣言された ModelType は変更されません。

このコンストラクターは、 の宣言された型sourceと互換性のない値に設定できるコンテキストModelでは使用しないでください。

適用対象

ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary)

ViewDataDictionary クラスの新しいインスタンスを初期化します。

public:
 ViewDataDictionary(Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ metadataProvider, Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState);
public ViewDataDictionary (Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState);
new Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
Public Sub New (metadataProvider As IModelMetadataProvider, modelState As ModelStateDictionary)

パラメーター

metadataProvider
IModelMetadataProvider

IModelMetadataProvider インスタンスの作成 ModelExplorer に使用されるインスタンス。

modelState
ModelStateDictionary

ModelStateDictionary このスコープの インスタンス。

注釈

新しい最上位レベルのスコープの を ViewDataDictionary 作成するときに使用します。

適用対象

ViewDataDictionary(IModelMetadataProvider, Type)

ViewDataDictionary クラスの新しいインスタンスを初期化します。

protected:
 ViewDataDictionary(Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ metadataProvider, Type ^ declaredModelType);
protected ViewDataDictionary (Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Type declaredModelType);
new Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Type -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
Protected Sub New (metadataProvider As IModelMetadataProvider, declaredModelType As Type)

パラメーター

metadataProvider
IModelMetadataProvider

IModelMetadataProvider インスタンスの作成 ModelExplorer に使用されるインスタンス。

declaredModelType
Type

Type 期待される値の Model 。 を設定 ModelMetadataするために使用されます。

注釈

新しい最上位のスコープの派生 ViewDataDictionary を作成するときに使用します。

適用対象

ViewDataDictionary(ViewDataDictionary, Type)

既存のインスタンスの一部に ViewDataDictionary 基づいて、 クラスの新しいインスタンスを初期化します。

protected:
 ViewDataDictionary(Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ source, Type ^ declaredModelType);
protected ViewDataDictionary (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, Type declaredModelType);
new Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Type -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
Protected Sub New (source As ViewDataDictionary, declaredModelType As Type)

パラメーター

source
ViewDataDictionary

ViewDataDictionary インスタンスを使用して初期値をコピーします。

declaredModelType
Type

Type 期待される値の Model 。 を設定 ModelMetadataするために使用されます。

注釈

インスタンスをコピーするときに ViewDataDictionary 使用するため、新しいインスタンスの宣言 ModelType は既知ですが、 Model ベース ViewDataDictionary インスタンスからインスタンスにコピーする場合など、既存のインスタンスからコピーする ViewDataDictionary<TModel> 必要があります。

このコンストラクターは、 が と互換性のない非null互換性があるdeclaredModelType場合source.Modelがありますthrow。 を にViewDataDictionary(ViewDataDictionary, Object, Type)model: nullして、 を無視source.Modelします。

適用対象

ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary, Type)

ViewDataDictionary クラスの新しいインスタンスを初期化します。

protected:
 ViewDataDictionary(Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ metadataProvider, Microsoft::AspNetCore::Mvc::ModelBinding::ModelStateDictionary ^ modelState, Type ^ declaredModelType);
protected ViewDataDictionary (Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, Type declaredModelType);
new Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary * Type -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
Protected Sub New (metadataProvider As IModelMetadataProvider, modelState As ModelStateDictionary, declaredModelType As Type)

パラメーター

metadataProvider
IModelMetadataProvider

IModelMetadataProvider インスタンスの作成 ModelExplorer に使用されるインスタンス。

modelState
ModelStateDictionary

ModelStateDictionary このスコープの インスタンス。

declaredModelType
Type

Type 期待される値の Model 。 を設定 ModelMetadataするために使用されます。

注釈

新しい最上位のスコープの派生 ViewDataDictionary を作成するときに使用します。

適用対象

ViewDataDictionary(ViewDataDictionary, Object, Type)

既存のインスタンスの一部に ViewDataDictionary 基づいて、 クラスの新しいインスタンスを初期化します。 このコンストラクターは、 が の場合に例外SetModel(Object)modelnullスローされないように注意してください。

protected:
 ViewDataDictionary(Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ source, System::Object ^ model, Type ^ declaredModelType);
protected ViewDataDictionary (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, object model, Type declaredModelType);
protected ViewDataDictionary (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, object? model, Type declaredModelType);
new Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * obj * Type -> Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
Protected Sub New (source As ViewDataDictionary, model As Object, declaredModelType As Type)

パラメーター

source
ViewDataDictionary

ViewDataDictionary インスタンスを使用して初期値をコピーします。

model
Object

プロパティの Model 値。

declaredModelType
Type

Type 期待される値の Model 。 を設定 ModelMetadataするために使用されます。

注釈

インスタンスと新しいインスタンスの ViewDataDictionary 宣言と ModelTypeModel をコピーするときに使用します。

このコンストラクターは、 が と互換性のない非null互換性があるdeclaredModelType場合modelがありますthrow

適用対象