1 instantiation of XName
System.Private.Xml.Linq (1)
System\Xml\Linq\XNamespace.cs (1)
226return _names.Add(new XName(this, localName.Substring(index, count)));
256 references to XName
BuildBoss (1)
ProjectUtil.cs (1)
120var referenceOutputAssemblyValue = r.Element(Namespace.GetName("ReferenceOutputAssembly"))?.Value ?? r.Attribute(XName.Get("ReferenceOutputAssembly"))?.Value;
Microsoft.AspNetCore.DataProtection (16)
KeyManagement\XmlKeyManager.cs (11)
38internal static readonly XName KeyElementName = "key"; 39internal static readonly XName IdAttributeName = "id"; 40internal static readonly XName VersionAttributeName = "version"; 41internal static readonly XName CreationDateElementName = "creationDate"; 42internal static readonly XName ActivationDateElementName = "activationDate"; 43internal static readonly XName ExpirationDateElementName = "expirationDate"; 44internal static readonly XName DescriptorElementName = "descriptor"; 45internal static readonly XName DeserializerTypeAttributeName = "deserializerType"; 46internal static readonly XName RevocationElementName = "revocation"; 47internal static readonly XName RevocationDateElementName = "revocationDate"; 48internal static readonly XName ReasonElementName = "reason";
LoggingExtensions.cs (1)
86public static partial void UnknownElementWithNameFoundInKeyringSkipping(this ILogger logger, XName name);
XmlConstants.cs (4)
21internal static readonly XName DecryptorTypeAttributeName = "decryptorType"; 26internal static readonly XName DeserializerTypeAttributeName = "deserializerType"; 31internal static readonly XName EncryptedSecretElementName = RootNamespace.GetName("encryptedSecret"); 36internal static readonly XName RequiresEncryptionAttributeName = RootNamespace.GetName("requiresEncryption");
Microsoft.AspNetCore.DataProtection.Tests (2)
XmlAssert.cs (1)
108return attribute.Name != (XName)"xmlns"
XmlEncryption\CertificateXmlEncryptionTests.cs (1)
50Assert.Equal(XName.Get("EncryptedData", "http://www.w3.org/2001/04/xmlenc#"), encryptedXmlInfo.EncryptedElement.Name);
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
AsyncEnumerableTestBase.cs (2)
89var projects = xml.Root.Elements(XName.Get("Project", @namespace)); 97var name = element.Element(XName.Get("Name", @namespace));
Microsoft.AspNetCore.OpenApi.SourceGenerators (2)
XmlComments\XmlComment.InheritDoc.cs (2)
144var crefAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.CrefAttributeName)); 145var pathAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName));
Microsoft.Build.Tasks.Core (1)
ResourceHandling\MSBuildResXReader.cs (1)
120bool preserve = elem.Attribute(XName.Get("space", "http://www.w3.org/XML/1998/namespace"))?.Value == "preserve";
Microsoft.Cci.Extensions (5)
Dgml\DgmlExtensions.cs (5)
31var xRoot = new XElement(XName.Get("DirectedGraph", dgmlNsp)); 34var xNodes = new XElement(XName.Get("Nodes", dgmlNsp)); 41var xNode = new XElement(XName.Get("Node", dgmlNsp), 47var xLinks = new XElement(XName.Get("Links", dgmlNsp)); 54var xLink = new XElement(XName.Get("Link", dgmlNsp),
Microsoft.CodeAnalysis.CSharp (4)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (4)
276XAttribute fileAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)); 277XAttribute pathAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)); 296XAttribute fileAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)); 297XAttribute pathAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName));
Microsoft.CodeAnalysis.Test.Utilities (4)
Assert\AssertXml.cs (4)
253IEnumerable<Tuple<XName, string>> attributes1 = element1.Attributes().Select(MakeAttributeTuple); 254IEnumerable<Tuple<XName, string>> attributes2 = element2.Attributes().Select(MakeAttributeTuple); 264private static Tuple<XName, string> MakeAttributeTuple(XAttribute attribute) 266return new Tuple<XName, string>(attribute.Name, attribute.Value);
Microsoft.CodeAnalysis.VisualBasic (5)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (5)
305Dim elementName As XName = element.Name 448Dim fileAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)) 449Dim pathAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)) 458Dim fileAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)) 459Dim pathAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName))
Microsoft.CodeAnalysis.Workspaces (2)
Shared\Extensions\ISymbolExtensions.cs (2)
347var crefAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.CrefAttributeName)); 348var pathAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (7)
SolutionGeneration.cs (3)
265var propertyGroup = document.Root.Descendants(XName.Get("PropertyGroup", NS)).First(); 333return new XElement(XName.Get(name, NS)); 338element.Add(new XElement(XName.Get(elementName, NS), elementValue));
VisualStudioMSBuildWorkspaceTests.cs (4)
2424r => r.Add(new XElement(XName.Get("ReferenceOutputAssembly", MSBuildNamespace), "false"))); 2444r => r.Add(new XElement(XName.Get("ReferenceOutputAssembly", MSBuildNamespace), "false"))); 2481var projectReferenceItems = document.Descendants(XName.Get("ProjectReference", MSBuildNamespace)); 2496r => r.Elements(XName.Get("Project", MSBuildNamespace)).Remove());
Microsoft.DotNet.Arcade.Sdk (2)
src\SourceBuild\AddSourceToNuGetConfig.cs (1)
35XName CreateQualifiedName(string plainName)
src\SourceBuild\ReadSourceBuildIntermediateNupkgDependencies.cs (1)
47XName CreateQualifiedName(string plainName)
Microsoft.DotNet.Build.Manifest (1)
XElementParsingExtensions.cs (1)
13public static string GetRequiredAttribute(this XElement element, XName name)
Microsoft.DotNet.Build.Tasks.Installers (2)
src\GenerateMacOSDistributionFile.cs (1)
134public static XElement WithAttribute(this XElement element, XName attribute, object value)
src\StabilizeWixFileId.cs (1)
55XName GetQualifiedName(string name) => rootNamespace.GetName(name);
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
Vsix\FinalizeInsertionVsixFile.cs (4)
79var installationElement = document.Element(XName.Get("PackageManifest", VsixNamespace))?.Element(XName.Get("Installation", VsixNamespace)); 94var systemComponentName = XName.Get("SystemComponent");
Microsoft.DotNet.NuGetRepack.Tasks (14)
src\NuGetVersionUpdater.cs (10)
149var metadata = nuspecXml.Element(XName.Get("package", nuspecXmlns))?.Element(XName.Get("metadata", nuspecXmlns)); 155packageId = metadata.Element(XName.Get("id", nuspecXmlns))?.Value; 161var versionElement = metadata.Element(XName.Get("version", nuspecXmlns)); 266var packageTypesElement = metadata.Element(XName.Get("packageTypes", nuspecXmlns)); 269foreach (var packageType in packageTypesElement.Elements(XName.Get("packageType", nuspecXmlns)) ?? Array.Empty<XElement>()) 290Element(XName.Get("package", package.NuspecXmlns))?. 291Element(XName.Get("metadata", package.NuspecXmlns))?. 292Element(XName.Get("dependencies", package.NuspecXmlns))?. 293Descendants(XName.Get("dependency", package.NuspecXmlns)) ?? Array.Empty<XElement>();
src\ReplacePackageParts.cs (4)
155var metadata = nuspecXml.Element(XName.Get("package", nuspecXmlns))?.Element(XName.Get("metadata", nuspecXmlns)); 162packageId = metadata.Element(XName.Get("id", nuspecXmlns))?.Value; 169var versionElement = metadata.Element(XName.Get("version", nuspecXmlns));
Microsoft.DotNet.XliffTasks (15)
Model\VsctDocument.cs (1)
33XName name = child.Name;
Model\XamlRuleDocument.cs (6)
30var descendentDisplayName = element.Elements(XName.Get($"{element.Name.LocalName}.DisplayName", element.Name.NamespaceName)).FirstOrDefault(); 31var descendentDescription = element.Elements(XName.Get($"{element.Name.LocalName}.Description", element.Name.NamespaceName)).FirstOrDefault(); 53var localizableProperties = element.Attribute(XName.Get(LocalizedPropertiesAttributeName, XliffTasksNs))?.Value?.Split(';'); 60if (element.Elements(XName.Get($"{element.Name.LocalName}.{localizableProperty}", element.Name.NamespaceName)).FirstOrDefault() is { } descendentValue) 82else if (AttributedName(element) == "SearchTerms" && (XmlName(attribute) == "Value" || element.Elements(XName.Get($"{element.Name.LocalName}.Value", element.Name.NamespaceName)).FirstOrDefault() is { })) 93else if (element.Elements(XName.Get($"{element.Name.LocalName}.Value", element.Name.NamespaceName)).FirstOrDefault() is { } descendentValue)
Model\XlfNames.cs (8)
11public static readonly XName Xliff = XliffNS + "xliff"; 12public static readonly XName File = XliffNS + "file"; 13public static readonly XName Body = XliffNS + "body"; 14public static readonly XName Group = XliffNS + "group"; 15public static readonly XName TransUnit = XliffNS + "trans-unit"; 16public static readonly XName Source = XliffNS + "source"; 17public static readonly XName Target = XliffNS + "target"; 18public static readonly XName Note = XliffNS + "note";
Microsoft.Maui.Resizetizer (13)
GeneratePackageAppxManifest.cs (11)
80 var xidentity = xmlns + "Identity"; 124 var xproperties = xmlns + "Properties"; 135 var xname = xmlns + "DisplayName"; 144 var xname = xmlns + "Logo"; 170 var xapplications = xmlns + "Applications"; 179 var xapplication = xmlns + "Application"; 188 var xvisual = xmlnsUap + "VisualElements"; 251 var xtile = xmlnsUap + "DefaultTile"; 308 var xshowname = xmlnsUap + "ShowNameOnTiles"; 317 var xshowon = xmlnsUap + "ShowOn"; 327 var xsplash = xmlnsUap + "SplashScreen";
GenerateTizenManifest.cs (2)
139 var xiconName = xmlns + IconName; 190 void UpdateElementAttribute(XElement element, XName attrName, string? value, string? placeholder)
Microsoft.VisualStudio.LanguageServices (5)
Snippets\SnippetExpansionClient.cs (5)
308var codeNode = snippetNode.Element(XName.Get("Code", ns)); 1078var referencesNode = snippetNode.Element(XName.Get("References", snippetNode.Name.NamespaceName)); 1088var assemblyXmlName = XName.Get("Assembly", snippetNode.Name.NamespaceName); 1091foreach (var reference in referencesNode.Elements(XName.Get("Reference", snippetNode.Name.NamespaceName)))
Microsoft.VisualStudio.LanguageServices.CSharp (4)
Snippets\CSharpSnippetExpansionLanguageHelper.cs (4)
78var importsNode = snippetNode.Element(XName.Get("Imports", snippetNode.Name.NamespaceName)); 111var namespaceXmlName = XName.Get("Namespace", snippetNode.Name.NamespaceName); 115foreach (var import in importsNode.Elements(XName.Get("Import", snippetNode.Name.NamespaceName)))
netstandard (1)
netstandard.cs (1)
2274[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XName))]
PresentationFramework-SystemXmlLinq (1)
SystemXmlLinqExtension.cs (1)
38XName name = ((XElement)item).Name;
System.ComponentModel.TypeConverter (10)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (10)
199private XName? _changeState; 354if (e != null && _value.element == e.Parent && _value.name != null && (_value.name == e.Name || _value.name == (_changeState as XName))) 499private readonly Func<XElement, XName?, IEnumerable<T>> _func; 501internal XName? name; 503public XDeferredAxis(Func<XElement, XName?, IEnumerable<T>> func, XElement element, XName? name) 543private readonly Func<XElement, XName, T?> _func; 545internal XName? name; 547public XDeferredSingleton(Func<XElement, XName, T?> func, XElement element, XName? name)
System.Private.Xml.Linq (131)
System\Xml\Linq\Extensions.cs (22)
32/// Returns the <see cref="XAttribute"/>s that have a matching <see cref="XName"/>. Each 34/// of <see cref="XElement"/> are scanned for a matching <see cref="XName"/>. 38/// Attributes with a matching <see cref="XName"/> for every <see cref="XElement"/> in 41public static IEnumerable<XAttribute> Attributes(this IEnumerable<XElement?> source, XName? name) 67/// and it's parent up to the root) that have a matching <see cref="XName"/>. This is done for each 72/// and it's parent up to the root) that have a matching <see cref="XName"/>. This is done for each 75public static IEnumerable<XElement> Ancestors<T>(this IEnumerable<T?> source, XName? name) where T : XNode 104/// that match the passed in <see cref="XName"/>. This is done for each 110/// that match the passed in <see cref="XName"/>. This is done for each 113public static IEnumerable<XElement> AncestorsAndSelf(this IEnumerable<XElement?> source, XName? name) 178/// and their children down to the leaf level) that have a matching <see cref="XName"/>. This is done 183/// and their children down to the leaf level) that have a matching <see cref="XName"/>. This is done 186public static IEnumerable<XElement> Descendants<T>(this IEnumerable<T?> source, XName? name) where T : XContainer 196/// that match the passed in <see cref="XName"/>. This is done for each 234/// to the leaf nodes) that match the passed in <see cref="XName"/>. This is done for 240/// to the leaf nodes) that match the passed in <see cref="XName"/>. This is done for 243public static IEnumerable<XElement> DescendantsAndSelf(this IEnumerable<XElement?> source, XName? name) 273public static IEnumerable<XElement> Elements<T>(this IEnumerable<T?> source, XName? name) where T : XContainer 341private static IEnumerable<XAttribute> GetAttributes(IEnumerable<XElement?> source, XName? name) 360private static IEnumerable<XElement> GetAncestors<T>(IEnumerable<T?> source, XName? name, bool self) where T : XNode 404private static IEnumerable<XElement> GetDescendants<T>(IEnumerable<T?> source, XName? name, bool self) where T : XContainer 437private static IEnumerable<XElement> GetElements<T>(IEnumerable<T?> source, XName? name) where T : XContainer
System\Xml\Linq\XAttribute.cs (4)
35internal XName name; 54public XAttribute(XName name, object value) 100public XName Name 700private static void ValidateAttribute(XName name, string value)
System\Xml\Linq\XContainer.cs (14)
273/// Returns the Descendant <see cref="XElement"/>s with the passed in <see cref="XName"/> as an IEnumerable 276/// <param name="name">The <see cref="XName"/> to match against descendant <see cref="XElement"/>s.</param> 278public IEnumerable<XElement> Descendants(XName? name) 284/// Returns the child element with this <see cref="XName"/> or null if there is no child element 285/// with a matching <see cref="XName"/>. 289/// The <see cref="XName"/> to match against this <see cref="XContainer"/>s child elements. 292/// An <see cref="XElement"/> child that matches the <see cref="XName"/> passed in, or null. 294public XElement? Element(XName name) 324/// Returns the child elements of this <see cref="XContainer"/> that match the <see cref="XName"/> passed in. 327/// The <see cref="XName"/> to match against the <see cref="XElement"/> children of this <see cref="XContainer"/>. 331/// a matching <see cref="XName"/>. 333public IEnumerable<XElement> Elements(XName? name) 766internal IEnumerable<XElement> GetDescendants(XName? name, bool self) 793private IEnumerable<XElement> GetElements(XName? name)
System\Xml\Linq\XElement.cs (31)
24/// An element has an <see cref="XName"/>, optionally one or more attributes, 49internal XName name = null!; 58public XElement(XName name) 76public XElement(XName name, object? content) 95public XElement(XName name, params object?[] content) : this(name, (object)content) { } 267public XName Name 324/// to the root node. Optionally an <see cref="XName"/> can be passed 345/// <see cref="XName"/>. If this <see cref="XElement"/>'s <see cref="XName"/> 346/// matches the <see cref="XName"/> passed in then it will be included in the 351/// The <see cref="XName"/> of the target ancestor. 355/// ancestors of this <see cref="XElement"/> with a matching <see cref="XName"/>. 357public IEnumerable<XElement> AncestorsAndSelf(XName? name) 364/// <see cref="XName"/>. 367/// The <see cref="XName"/> of the <see cref="XAttribute"/> to get. 370/// The <see cref="XAttribute"/> with the <see cref="XName"/> passed in. If there is no <see cref="XAttribute"/> 371/// with this <see cref="XName"/> then null is returned. 373public XAttribute? Attribute(XName name) 389/// an <see cref="XName"/> can be given to target a specific <see cref="XAttribute"/>(s). 406/// in <see cref="XName"/>. 410/// The <see cref="XName"/> of the targeted <see cref="XAttribute"/>. 415public IEnumerable<XAttribute> Attributes(XName? name) 431/// specification of a type of descendant to return, or a specific <see cref="XName"/> 449/// Returns the descendants of this <see cref="XElement"/> that have a matching <see cref="XName"/> 451/// <seealso cref="XElement.DescendantsAndSelf(XName)"/> 454/// The <see cref="XName"/> of the descendant <see cref="XElement"/> that is being targeted. 458/// <see cref="XElement"/>s that have this <see cref="XName"/>. 460public IEnumerable<XElement> DescendantsAndSelf(XName? name) 1215public void SetAttributeValue(XName name, object? value) 1255public void SetElementValue(XName name, object? value) 1964private IEnumerable<XAttribute> GetAttributes(XName? name)
System\Xml\Linq\XName.cs (28)
13public sealed class XName : IEquatable<XName>, ISerializable 32/// <seealso cref="XName.Namespace"/> 64/// Returns an <see cref="XName"/> object created from the specified expanded name. 70/// An <see cref="XName"/> object constructed from the specified expanded name. 72public static XName Get(string expandedName) 88/// Returns an <see cref="XName"/> object from a local name and a namespace. 93public static XName Get(string localName, string namespaceName) 105public static implicit operator XName?(string? expandedName) 111/// Determines whether the specified <see cref="XName"/> is equal to the current <see cref="XName"/>. 115/// true if the specified <see cref="XName"/> is equal to the current XName; otherwise false. 118/// For two <see cref="XName"/> objects to be equal, they must have the same expanded name. 126/// Serves as a hash function for <see cref="XName"/>. GetHashCode is suitable 141/// Returns a value indicating whether two instances of <see cref="XName"/> are equal. 150public static bool operator ==(XName? left, XName? right) 156/// Returns a value indicating whether two instances of <see cref="XName"/> are not equal. 165public static bool operator !=(XName? left, XName? right) 171/// Indicates whether the current <see cref="XName"/> is equal to 172/// the specified <see cref="XName"/> 174/// <param name="other">The <see cref="XName"/> to compare with the 175/// current <see cref="XName"/></param> 177/// Returns true if the current <see cref="XName"/> is equal to 178/// the specified <see cref="XName"/>. Returns false otherwise. 180bool IEquatable<XName>.Equals(XName? other) 187/// serialize the <see cref="XName"/>
System\Xml\Linq\XNamespace.cs (14)
26private readonly XHashtable<XName> _names; 38_names = new XHashtable<XName>(ExtractLocalName, NamesCapacity); 50/// Returns an <see cref="XName"/> object created from the current instance and the specified local name. 53/// The returned <see cref="XName"/> object is guaranteed to be atomic (i.e. the only one in the system for this 56public XName GetName(string localName) 136/// Combines an <see cref="XNamespace"/> object with a local name to create an <see cref="XName"/>. 141public static XName operator +(XNamespace ns, string localName) 211/// Returns an <see cref="XName"/> created from this XNamespace <see cref="XName"/> and a portion of the passed in 212/// local name parameter. The returned <see cref="XName"/> object is guaranteed to be atomic (i.e. the only one in the system for 215internal XName GetName(string localName, int index, int count) 221XName? name; 269/// This function is used by the <see cref="XHashtable{XName}"/> to extract the local name part from an <see cref="XName"/>. The hash table 272private static string ExtractLocalName(XName n)
System\Xml\Linq\XNode.cs (6)
208public IEnumerable<XElement> Ancestors(XName? name) 362public IEnumerable<XElement> ElementsAfterSelf(XName? name) 388public IEnumerable<XElement> ElementsBeforeSelf(XName? name) 630internal IEnumerable<XElement> GetAncestors(XName? name, bool self) 640private IEnumerable<XElement> GetElementsAfterSelf(XName? name) 651private IEnumerable<XElement> GetElementsBeforeSelf(XName? name)
System\Xml\Linq\XNodeBuilder.cs (1)
13private XName? _attrName;
System\Xml\Linq\XNodeReader.cs (2)
399XName name = XNamespace.Xml.GetName("lang"); 425XName name = XNamespace.Xml.GetName("space");
System\Xml\Linq\XStreamingElement.cs (5)
17internal XName name; 24public XStreamingElement(XName name) 36public XStreamingElement(XName name, object? content) 47public XStreamingElement(XName name, params object?[] content) 56public XName Name
System\Xml\Schema\XNodeValidator.cs (3)
27private readonly XName xsiTypeName; 28private readonly XName xsiNilName; 219XName name = a.Name;
System\Xml\XPath\XNodeNavigator.cs (1)
850XName name = a.Name;
System.Xml.Linq (1)
System.Xml.Linq.cs (1)
16[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XName))]
System.Xml.XDocument (1)
artifacts\obj\System.Xml.XDocument\Debug\net10.0\System.Xml.XDocument.Forwards.cs (1)
15[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XName))]