ReadOnlyTagHelperAttributeList.TryGetAttributes 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用 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 相符 name
的 TagHelperAttribute 。
傳回
true
如果集合中至少有一個 TagHelperAttribute 具有相同 Name 的 ,則為 , false
否則為 。
備註
name
不區分大小寫。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應