ValidationAttributeAdapter<TAttribute>.MergeAttribute 方法

定义

如果 attributes 不包含 的值,则向 中添加attributes给定keykeyvalue

protected:
 static bool MergeAttribute(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ attributes, System::String ^ key, System::String ^ value);
protected static bool MergeAttribute (System.Collections.Generic.IDictionary<string,string> attributes, string key, string value);
static member MergeAttribute : System.Collections.Generic.IDictionary<string, string> * string * string -> bool
Protected Shared Function MergeAttribute (attributes As IDictionary(Of String, String), key As String, value As String) As Boolean

参数

attributes
IDictionary<String,String>

HTML 属性字典。

key
String

属性键。

value
String

特性值。

返回

true 如果添加了特性,则为 ;否则为 false

适用于