|
XmlExtensionsIs Method
|
Namespace: GSF.XmlAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.230-beta+03417d7b5cff037b24e882d7adef82d359b34964
Syntaxpublic static IEnumerable<XElement> Is(
this IEnumerable<Tuple<XElement, string>> source,
string attributeValue,
bool ignoreCase = true
)
<ExtensionAttribute>
Public Shared Function Is (
source As IEnumerable(Of Tuple(Of XElement, String)),
attributeValue As String,
Optional ignoreCase As Boolean = true
) As IEnumerable(Of XElement)
public:
[ExtensionAttribute]
static IEnumerable<XElement^>^ Is(
IEnumerable<Tuple<XElement^, String^>^>^ source,
String^ attributeValue,
bool ignoreCase = true
)
[<ExtensionAttribute>]
static member Is :
source : IEnumerable<Tuple<XElement, string>> *
attributeValue : string *
?ignoreCase : bool
(* Defaults:
let _ignoreCase = defaultArg ignoreCase true
*)
-> IEnumerable<XElement>
GSF.Xml.XmlExtensions.Is = function(source, attributeValue, ignoreCase);
View SourceParameters
- source IEnumerableTupleXElement, String
- Attributes queried from WhereAttribute(IEnumerableXElement, String) extension.
- attributeValue String
- Attribute value to match.
- ignoreCase Boolean (Optional)
- Flag that determines if attribute value match is case sensitive.
Return Value
IEnumerableXElementXElement items that match
attributeValue.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableTupleXElement,
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
When used in conjunction with the
WhereAttribute(IEnumerableXElement, String) extension, allows for expressions like:
var globals = XDocument.Load(configFile)
.Descendants("SettingsGroup")
.WhereAttribute("Type").Is("Globals");
See Also