ReadOnlyTagHelperAttributeList.TryGetAttributes 方法

定义

使用匹配 nameTagHelperAttribute检索集合Name中的 。

public:
 bool TryGetAttributes(System::String ^ name, [Runtime::InteropServices::Out] System::Collections::Generic::IReadOnlyList<Microsoft::AspNetCore::Razor::TagHelpers::TagHelperAttribute ^> ^ % attributes);
public bool TryGetAttributes (string name, out System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute> attributes);
member this.TryGetAttributes : string * IReadOnlyList -> bool
Public Function TryGetAttributes (name As String, ByRef attributes As IReadOnlyList(Of TagHelperAttribute)) As Boolean

参数

name
String

Name 获取的 的 TagHelperAttribute

attributes
IReadOnlyList<TagHelperAttribute>

此方法返回时,TagHelperAttribute具有匹配 nameName

返回

true 如果集合中至少有一个 TagHelperAttribute 具有相同 Name 的 ,则为 ;否则为 false

注解

name 不区分大小写地进行比较。

适用于