ModelStateDictionary.SetModelValue 方法

定义

重载

SetModelValue(String, ValueProviderResult)

使用指定的 key设置 的值ModelStateEntry

SetModelValue(String, Object, String)

使用指定的 设置 的 RawValueModelStateEntryAttemptedValuekey

SetModelValue(String, ValueProviderResult)

Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs

使用指定的 key设置 的值ModelStateEntry

public:
 void SetModelValue(System::String ^ key, Microsoft::AspNetCore::Mvc::ModelBinding::ValueProviderResult valueProviderResult);
public void SetModelValue (string key, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult valueProviderResult);
member this.SetModelValue : string * Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult -> unit
Public Sub SetModelValue (key As String, valueProviderResult As ValueProviderResult)

参数

key
String

条目的 ModelStateEntry

valueProviderResult
ValueProviderResult

一个 ValueProviderResult ,其中包含条目的数据 ModelStateEntry

适用于

SetModelValue(String, Object, String)

Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs

使用指定的 设置 的 RawValueModelStateEntryAttemptedValuekey

public:
 void SetModelValue(System::String ^ key, System::Object ^ rawValue, System::String ^ attemptedValue);
public void SetModelValue (string key, object rawValue, string attemptedValue);
public void SetModelValue (string key, object? rawValue, string attemptedValue);
public void SetModelValue (string key, object? rawValue, string? attemptedValue);
member this.SetModelValue : string * obj * string -> unit
Public Sub SetModelValue (key As String, rawValue As Object, attemptedValue As String)

参数

key
String

条目的 ModelStateEntry 键。

rawValue
Object

条目的原始值 ModelStateEntry

attemptedValue
String

逗号分隔String中的 的值rawValue

适用于