Udostępnij za pośrednictwem


ReadOnlyTagHelperAttributeList.TryGetAttribute Metoda

Definicja

Pobiera pierwszy TagHelperAttribute element z pasującym elementem Namename.

public:
 bool TryGetAttribute(System::String ^ name, [Runtime::InteropServices::Out] Microsoft::AspNetCore::Razor::TagHelpers::TagHelperAttribute ^ % attribute);
public bool TryGetAttribute (string name, out Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute);
member this.TryGetAttribute : string * TagHelperAttribute -> bool
Public Function TryGetAttribute (name As String, ByRef attribute As TagHelperAttribute) As Boolean

Parametry

name
String

The Name z TagHelperAttribute , aby dostać.

attribute
TagHelperAttribute

Gdy ta metoda zostanie zwrócona, pierwsza TagHelperAttribute z pasującymi nameelementami Name , jeśli zostanie znaleziona; w przeciwnym razie null.

Zwraca

true jeśli obiekt TagHelperAttribute o takiej samej Name nazwie istnieje w kolekcji; w przeciwnym razie false.

Uwagi

name jest porównywana wielkość liter bez uwzględniania wielkości liter.

Dotyczy