XmlExtensions.GetAttributes Method
Returns the values of the specified attribute in each element in the collection. Does not return NULL or empty values. This element is introduced in Windows PowerShell 5.0.
Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)
Usage
'Usage
Dim elements As IEnumerable(Of DynamicElement)
Dim attributeName As String
Dim returnValue As IEnumerable(Of String)
returnValue = XmlExtensions.GetAttributes(elements, attributeName)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function GetAttributes ( _
elements As IEnumerable(Of DynamicElement), _
attributeName As String _
) As IEnumerable(Of String)
[ExtensionAttribute]
public static IEnumerable<string> GetAttributes (
IEnumerable<DynamicElement> elements,
string attributeName
)
[ExtensionAttribute]
public:
static IEnumerable<String^>^ GetAttributes (
IEnumerable<DynamicElement^>^ elements,
String^ attributeName
)
/** @attribute ExtensionAttribute() */
public static IEnumerable<String> GetAttributes (
IEnumerable<DynamicElement> elements,
String attributeName
)
ExtensionAttribute
public static function GetAttributes (
elements : IEnumerable<DynamicElement>,
attributeName : String
) : IEnumerable<String>
Parameters
- elements
- attributeName
Return Value
Returns IEnumerable.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Target Platforms
See Also
Reference
XmlExtensions Class
XmlExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace