DefaultHtmlGenerator.GetCurrentValues メソッド

定義

指定 expressionした の現在の値のコレクションを取得します。

public:
 virtual System::Collections::Generic::ICollection<System::String ^> ^ GetCurrentValues(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, bool allowMultiple);
public virtual System.Collections.Generic.ICollection<string> GetCurrentValues (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, bool allowMultiple);
abstract member GetCurrentValues : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * bool -> System.Collections.Generic.ICollection<string>
override this.GetCurrentValues : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * bool -> System.Collections.Generic.ICollection<string>
Public Overridable Function GetCurrentValues (viewContext As ViewContext, modelExplorer As ModelExplorer, expression As String, allowMultiple As Boolean) As ICollection(Of String)

パラメーター

viewContext
ViewContext

現在の ViewContext スコープのインスタンス。

modelExplorer
ModelExplorer

ModelExplorerexpressionの場合は 。 の場合nullは、 を使用して結果をEval(String)計算しますexpression

expression
String

現在のモデルを基準とした式名。

allowMultiple
Boolean

の場合 trueは、コレクション expression の結果が必要です。 それ以外の場合は、結果を 1 つの値として扱います。

戻り値

null 結果が見つからない expression 場合は 。 それ以外の場合は、指定expressionされた ICollection<T> の現在の値を含む 。

結果を expressionString変換します。 その結果が型の IEnumerable 場合は、代わりにコレクション内の各項目を変換し、それらを個別に返します。

expression結果または要素の型が のEnum場合は、値の整数表現と、その値のすべてのEnum名前をEnum含む を返Stringします。 それ以外の場合は、値の既定 String の変換を返します。

実装

適用対象