ModelStateDictionary.SetModelValue 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| SetModelValue(String, ValueProviderResult) | 使用指定的  | 
| SetModelValue(String, Object, String) | 使用指定的 设置 的 RawValueModelStateEntry 和 AttemptedValue 。 | 
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 -> unitPublic 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
使用指定的 设置 的 RawValueModelStateEntry 和 AttemptedValue 。key
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 -> unitPublic Sub SetModelValue (key As String, rawValue As Object, attemptedValue As String)参数
- key
- String
条目的 ModelStateEntry 键。
- rawValue
- Object
条目的原始值 ModelStateEntry 。