共用方式為


ReadOnlyTagHelperAttributeList.TryGetAttributes 方法

定義

使用 TagHelperAttribute 相符 name 的 擷取集合 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>

當這個方法傳回時,具有 Name 相符 nameTagHelperAttribute

傳回

true 如果集合中至少有一個 TagHelperAttribute 具有相同 Name 的 ,則為 , false 否則為 。

備註

name 不區分大小寫。

適用於