This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Incubator.
Summary
Combines an XNamespace with an element name into an XName, handling the case where
the namespace is null (pre-VS2017 csproj files use a default namespace; modern
SDK-style projects don't).
- Assembly
- Cake
.Incubator .dll - Namespace
- Cake
.Incubator .XDocumentExtensions - Containing Type
- XDocumentExtensions
Syntax
public static XName GetXNameWithNamespace(this XNamespace ns, string elementName)
Parameters
| Name | Type | Description |
|---|---|---|
| ns | XNamespace | the namespace (or null) |
| elementName | string | the element name |
Return Value
| Type | Description |
|---|---|
| XName | an XName scoped to the namespace when provided |
