1 instantiation of XName
System.Private.Xml.Linq (1)
System\Xml\Linq\XNamespace.cs (1)
226
return _names.Add(new
XName
(this, localName.Substring(index, count)));
440 references to XName
Microsoft.AspNetCore.DataProtection (19)
_generated\0\LoggerMessage.g.cs (3)
233
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Xml.Linq.
XName
, global::System.Exception?> __UnknownElementWithNameFoundInKeyringSkippingCallback =
234
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Xml.Linq.
XName
>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(15, "UnknownElementWithNameFoundInKeyringSkipping"), "Unknown element with name '{Name}' found in keyring, skipping.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
241
public static partial void UnknownElementWithNameFoundInKeyringSkipping(this global::Microsoft.Extensions.Logging.ILogger logger, global::System.Xml.Linq.
XName
name)
KeyManagement\XmlKeyManager.cs (11)
38
internal static readonly
XName
KeyElementName = "key";
39
internal static readonly
XName
IdAttributeName = "id";
40
internal static readonly
XName
VersionAttributeName = "version";
41
internal static readonly
XName
CreationDateElementName = "creationDate";
42
internal static readonly
XName
ActivationDateElementName = "activationDate";
43
internal static readonly
XName
ExpirationDateElementName = "expirationDate";
44
internal static readonly
XName
DescriptorElementName = "descriptor";
45
internal static readonly
XName
DeserializerTypeAttributeName = "deserializerType";
46
internal static readonly
XName
RevocationElementName = "revocation";
47
internal static readonly
XName
RevocationDateElementName = "revocationDate";
48
internal static readonly
XName
ReasonElementName = "reason";
LoggingExtensions.cs (1)
86
public static partial void UnknownElementWithNameFoundInKeyringSkipping(this ILogger logger,
XName
name);
XmlConstants.cs (4)
21
internal static readonly
XName
DecryptorTypeAttributeName = "decryptorType";
26
internal static readonly
XName
DeserializerTypeAttributeName = "deserializerType";
31
internal static readonly
XName
EncryptedSecretElementName = RootNamespace.GetName("encryptedSecret");
36
internal static readonly
XName
RequiresEncryptionAttributeName = RootNamespace.GetName("requiresEncryption");
Microsoft.AspNetCore.OpenApi.SourceGenerators (2)
XmlComments\XmlComment.InheritDoc.cs (2)
144
var crefAttribute = element.Attribute(
XName
.Get(DocumentationCommentXmlNames.CrefAttributeName));
145
var pathAttribute = element.Attribute(
XName
.Get(DocumentationCommentXmlNames.PathAttributeName));
Microsoft.Build.Tasks.Core (1)
ResourceHandling\MSBuildResXReader.cs (1)
122
bool preserve = elem.Attribute(
XName
.Get("space", "http://www.w3.org/XML/1998/namespace"))?.Value == "preserve";
Microsoft.CodeAnalysis.CSharp (4)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (4)
276
XAttribute fileAttr = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.FileAttributeName));
277
XAttribute pathAttr = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.PathAttributeName));
296
XAttribute fileAttr = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.FileAttributeName));
297
XAttribute pathAttr = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.PathAttributeName));
Microsoft.CodeAnalysis.VisualBasic (5)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (5)
305
Dim elementName As
XName
= element.Name
448
Dim fileAttr As XAttribute = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.FileAttributeName))
449
Dim pathAttr As XAttribute = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.PathAttributeName))
458
Dim fileAttr As XAttribute = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.FileAttributeName))
459
Dim pathAttr As XAttribute = includeElement.Attribute(
XName
.Get(DocumentationCommentXmlNames.PathAttributeName))
Microsoft.CodeAnalysis.Workspaces (2)
Shared\Extensions\ISymbolExtensions.cs (2)
346
var crefAttribute = element.Attribute(
XName
.Get(DocumentationCommentXmlNames.CrefAttributeName));
347
var pathAttribute = element.Attribute(
XName
.Get(DocumentationCommentXmlNames.PathAttributeName));
Microsoft.DotNet.Build.Manifest (1)
XElementParsingExtensions.cs (1)
13
public static string GetRequiredAttribute(this XElement element,
XName
name)
Microsoft.DotNet.Build.Tasks.Installers (2)
src\GenerateMacOSDistributionFile.cs (1)
134
public static XElement WithAttribute(this XElement element,
XName
attribute, object value)
src\StabilizeWixFileId.cs (1)
55
XName
GetQualifiedName(string name) => rootNamespace.GetName(name);
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
Vsix\FinalizeInsertionVsixFile.cs (4)
79
var installationElement = document.Element(
XName
.Get("PackageManifest", VsixNamespace))?.Element(
XName
.Get("Installation", VsixNamespace));
94
var
systemComponentName =
XName
.Get("SystemComponent");
Microsoft.DotNet.NuGetRepack.Tasks (14)
src\NuGetVersionUpdater.cs (10)
149
var metadata = nuspecXml.Element(
XName
.Get("package", nuspecXmlns))?.Element(
XName
.Get("metadata", nuspecXmlns));
155
packageId = metadata.Element(
XName
.Get("id", nuspecXmlns))?.Value;
161
var versionElement = metadata.Element(
XName
.Get("version", nuspecXmlns));
266
var packageTypesElement = metadata.Element(
XName
.Get("packageTypes", nuspecXmlns));
269
foreach (var packageType in packageTypesElement.Elements(
XName
.Get("packageType", nuspecXmlns)) ?? Array.Empty<XElement>())
290
Element(
XName
.Get("package", package.NuspecXmlns))?.
291
Element(
XName
.Get("metadata", package.NuspecXmlns))?.
292
Element(
XName
.Get("dependencies", package.NuspecXmlns))?.
293
Descendants(
XName
.Get("dependency", package.NuspecXmlns)) ?? Array.Empty<XElement>();
src\ReplacePackageParts.cs (4)
142
var metadata = nuspecXml.Element(
XName
.Get("package", nuspecXmlns))?.Element(
XName
.Get("metadata", nuspecXmlns));
149
packageId = metadata.Element(
XName
.Get("id", nuspecXmlns))?.Value;
156
var versionElement = metadata.Element(
XName
.Get("version", nuspecXmlns));
Microsoft.DotNet.XliffTasks (15)
Model\VsctDocument.cs (1)
33
XName
name = child.Name;
Model\XamlRuleDocument.cs (6)
30
var descendentDisplayName = element.Elements(
XName
.Get($"{element.Name.LocalName}.DisplayName", element.Name.NamespaceName)).FirstOrDefault();
31
var descendentDescription = element.Elements(
XName
.Get($"{element.Name.LocalName}.Description", element.Name.NamespaceName)).FirstOrDefault();
53
var localizableProperties = element.Attribute(
XName
.Get(LocalizedPropertiesAttributeName, XliffTasksNs))?.Value?.Split(';');
60
if (element.Elements(
XName
.Get($"{element.Name.LocalName}.{localizableProperty}", element.Name.NamespaceName)).FirstOrDefault() is { } descendentValue)
82
else if (AttributedName(element) == "SearchTerms" && (XmlName(attribute) == "Value" || element.Elements(
XName
.Get($"{element.Name.LocalName}.Value", element.Name.NamespaceName)).FirstOrDefault() is { }))
93
else if (element.Elements(
XName
.Get($"{element.Name.LocalName}.Value", element.Name.NamespaceName)).FirstOrDefault() is { } descendentValue)
Model\XlfNames.cs (8)
11
public static readonly
XName
Xliff = XliffNS + "xliff";
12
public static readonly
XName
File = XliffNS + "file";
13
public static readonly
XName
Body = XliffNS + "body";
14
public static readonly
XName
Group = XliffNS + "group";
15
public static readonly
XName
TransUnit = XliffNS + "trans-unit";
16
public static readonly
XName
Source = XliffNS + "source";
17
public static readonly
XName
Target = XliffNS + "target";
18
public static readonly
XName
Note = XliffNS + "note";
Microsoft.Extensions.AI.Abstractions.Tests (29)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.GetJsonTypeInfo.g.cs (1)
388
if (type == typeof(global::System.Xml.Linq.
XName
))
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.XAttribute.g.cs (3)
73
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.
XName
>
88
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XAttribute).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.
XName
), global::System.Array.Empty<global::System.Type>(), null),
91
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.
XName
>(options, info1);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.XElement.g.cs (3)
153
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.
XName
>
168
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.
XName
), global::System.Array.Empty<global::System.Type>(), null),
171
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.
XName
>(options, info5);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.XName.g.cs (22)
15
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
>? _XName;
21
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
> XName
24
get => _XName ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
>)Options.GetTypeInfo(typeof(global::System.Xml.Linq.
XName
));
27
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
> Create_XName(global::System.Text.Json.JsonSerializerOptions options)
29
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Xml.Linq.
XName
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
> jsonTypeInfo))
31
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::System.Xml.Linq.
XName
>
41
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::System.Xml.Linq.
XName
>(options, objectInfo);
58
DeclaringType = typeof(global::System.Xml.Linq.
XName
),
60
Getter = static obj => ((global::System.Xml.Linq.
XName
)obj).LocalName,
68
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.
XName
).GetProperty("LocalName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
78
DeclaringType = typeof(global::System.Xml.Linq.
XName
),
80
Getter = static obj => ((global::System.Xml.Linq.
XName
)obj).Namespace,
88
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.
XName
).GetProperty("Namespace", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XNamespace), global::System.Array.Empty<global::System.Type>(), null),
98
DeclaringType = typeof(global::System.Xml.Linq.
XName
),
100
Getter = static obj => ((global::System.Xml.Linq.
XName
)obj).NamespaceName,
108
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.
XName
).GetProperty("NamespaceName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
118
private void XNameSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Xml.Linq.
XName
? value)
128
writer.WriteString(PropName_LocalName, ((global::System.Xml.Linq.
XName
)value).LocalName);
130
XNamespaceSerializeHandler(writer, ((global::System.Xml.Linq.
XName
)value).Namespace);
131
writer.WriteString(PropName_NamespaceName, ((global::System.Xml.Linq.
XName
)value).NamespaceName);
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.NET.Build.Tasks (1)
StoreArtifactParser.cs (1)
20
var
rootName = doc.Root.Name;
netstandard (1)
netstandard.cs (1)
2274
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.
XName
))]
NuGet.Configuration (8)
Settings\Items\FileClientCertItem.cs (3)
56
var path = element.Attribute(
XName
.Get(ConfigurationConstants.PathAttribute))?.Value;
57
var password = element.Attribute(
XName
.Get(ConfigurationConstants.PasswordAttribute))?.Value;
58
var clearTextPassword = element.Attribute(
XName
.Get(ConfigurationConstants.ClearTextPasswordAttribute))?.Value;
Settings\Items\StoreClientCertItem.cs (4)
75
var storeLocation = element.Attribute(
XName
.Get(ConfigurationConstants.StoreLocationAttribute))?.Value;
83
var storeName = element.Attribute(
XName
.Get(ConfigurationConstants.StoreNameAttribute))?.Value;
91
var findBy = element.Attribute(
XName
.Get(ConfigurationConstants.FindByAttribute))?.Value;
99
var findValue = element.Attribute(
XName
.Get(ConfigurationConstants.FindValueAttribute))?.Value;
Utility\XElementUtility.cs (1)
20
var attr = element.Attribute(
XName
.Get(localName, namespaceName));
NuGet.PackageManagement (10)
FileModifiers\XmlTransformer.cs (2)
23
private readonly IDictionary<
XName
, Action<XElement, XElement>> _nodeActions;
31
public XmlTransformer(IDictionary<
XName
, Action<XElement, XElement>> nodeActions)
Projects\MSBuildNuGetProject.cs (2)
629
private static IDictionary<
XName
, Action<XElement, XElement>> GetConfigMappings()
634
return new Dictionary<
XName
, Action<XElement, XElement>>
Utility\MSBuildNuGetProjectSystemUtility.cs (1)
25
internal static XDocument GetOrCreateDocument(
XName
rootName, string path, IMSBuildProjectSystem msBuildNuGetProjectSystem)
Utility\XElementExtensions.cs (3)
27
attr = element.Attribute(
XName
.Get(localName, namespaceName));
41
child = element.Element(
XName
.Get(localName, namespaceName));
113
public static XElement MergeWith(this XElement source, XElement target, IDictionary<
XName
, Action<XElement, XElement>> nodeActions)
Utility\XmlUtility.cs (2)
13
public static XDocument GetOrCreateDocument(
XName
rootName, string root, string path, INuGetProjectContext nuGetProjectContext)
27
public static XDocument CreateDocument(
XName
rootName, string root, string path, INuGetProjectContext nuGetProjectContext)
NuGet.Packaging (72)
Core\NuspecCoreReader.cs (4)
37
var nodes = MetadataNode.Elements(
XName
.Get("dependencies", MetadataNode.GetDefaultNamespace().NamespaceName))
38
.Descendants(
XName
.Get("dependency", MetadataNode.GetDefaultNamespace().NamespaceName));
42
var versionNode = node.Attribute(
XName
.Get(Version));
51
yield return new PackageDependency(node.Attribute(
XName
.Get(Id))!.Value, range);
Core\NuspecCoreReaderBase.cs (4)
84
var node = MetadataNode.Elements(
XName
.Get(Id, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
95
var node = MetadataNode.Elements(
XName
.Get(Version, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
104
var node = MetadataNode.Attribute(
XName
.Get(MinClientVersion));
129
var node = MetadataNode.Elements(
XName
.Get(DevelopmentDependency, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
Core\NuspecUtility.cs (9)
57
.Elements(
XName
.Get(PackageTypes, metadataNamespace))
58
.SelectMany(x => x.Elements(
XName
.Get(PackageType, metadataNamespace)));
73
var nameAttribute = node.Attribute(
XName
.Get(Name));
83
var versionAttribute = node.Attribute(
XName
.Get(Version));
117
var element = metadataNode.Elements(
XName
.Get(Serviceable, metadataNamespace)).FirstOrDefault();
149
.Elements(
XName
.Get(FrameworkReferences, ns!));
151
.Elements(
XName
.Get(Group, ns!));
165
frameworkRefGroup.Elements(
XName
.Get(FrameworkReference, ns!)) :
182
var attribute = element.Attribute(
XName
.Get(attributeName));
NuspecReader.cs (20)
124
.Elements(
XName
.Get(Dependencies, ns));
128
.Elements(
XName
.Get(Group, ns));
137
.Elements(
XName
.Get(Dependency, ns));
152
.Elements(
XName
.Get(Dependency, ns));
172
foreach (var group in MetadataNode.Elements(
XName
.Get(References, ns)).Elements(
XName
.Get(Group, ns)))
178
var items = group.Elements(
XName
.Get(Reference, ns)).Select(n => GetAttributeValue(n, File)!).Where(n => !string.IsNullOrEmpty(n)).ToArray();
188
var items = MetadataNode.Elements(
XName
.Get(References, ns))
189
.Elements(
XName
.Get(Reference, ns)).Select(n => GetAttributeValue(n, File)!).Where(n => !string.IsNullOrEmpty(n)).ToArray();
220
foreach (var group in MetadataNode.Elements(
XName
.Get(FrameworkAssemblies, ns)).Elements(
XName
.Get(FrameworkAssembly, ns))
273
var node = MetadataNode.Elements(
XName
.Get(Language, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
282
var node = MetadataNode.Elements(
XName
.Get(LicenseUrl, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
294
.Elements(
XName
.Get(ContentFiles, ns))
295
.Elements(
XName
.Get(Files, ns)))
414
var node = MetadataNode.Elements(
XName
.Get(Repository, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
436
var licenseNode = MetadataNode.Elements(
XName
.Get(NuspecUtility.License, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
582
var node = MetadataNode.Elements(
XName
.Get(Icon, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
592
var node = MetadataNode.Elements(
XName
.Get(Readme, MetadataNode.GetDefaultNamespace().NamespaceName)).FirstOrDefault();
629
var attribute = element.Attribute(
XName
.Get(attributeName));
PackageCreation\Authoring\Manifest.cs (1)
138
e.Name =
XName
.Get(e.Name.LocalName, schemaNamespace);
PackageCreation\Extensions\XElementExtensions.cs (1)
23
attr = element.Attribute(
XName
.Get(localName, namespaceName!));
PackagesConfig.cs (2)
27
var attribute = node.Attributes(
XName
.Get(name)).FirstOrDefault();
45
foreach (var package in node.Elements(
XName
.Get(PackageNodeName)))
PackagesConfigReader.cs (2)
108
var node = _doc.Root!.Attribute(
XName
.Get(PackagesConfig.MinClientAttributeName));
143
foreach (var package in _doc.Root!.Elements(
XName
.Get(PackagesConfig.PackageNodeName)))
PackagesConfigWriter.cs (19)
132
var minClientVersionAttribute = new XAttribute(
XName
.Get(PackagesConfig.MinClientAttributeName), _minClientVersion.ToNormalizedString());
268
var originalPackagesNode = originalConfig.Element(
XName
.Get(PackagesConfig.PackagesNodeName));
279
var packagesNode = _xDocument.Element(
XName
.Get(PackagesConfig.PackagesNodeName));
363
var node = new XElement(
XName
.Get(PackagesConfig.PackageNodeName));
365
node.Add(new XAttribute(
XName
.Get(PackagesConfig.IdAttributeName), entry.PackageIdentity.Id));
366
node.Add(new XAttribute(
XName
.Get(PackagesConfig.VersionAttributeName), entry.PackageIdentity.Version));
376
node.Add(new XAttribute(
XName
.Get(PackagesConfig.TargetFrameworkAttributeName), frameworkShortName));
382
node.Add(new XAttribute(
XName
.Get(PackagesConfig.allowedVersionsAttributeName), entry.AllowedVersions.ToString()));
387
node.Add(new XAttribute(
XName
.Get(PackagesConfig.developmentDependencyAttributeName), "true"));
392
node.Add(new XAttribute(
XName
.Get(PackagesConfig.RequireInstallAttributeName), "true"));
402
var packagesNode = new XElement(
XName
.Get(PackagesConfig.PackagesNodeName));
410
var packagesNode = _xDocument.Element(
XName
.Get(PackagesConfig.PackagesNodeName));
455
foreach (
XName
name in existingAttributeNames)
466
if (name.Equals(
XName
.Get(PackagesConfig.RequireInstallAttributeName)))
484
foreach (
XName
name in addableAttributeNames)
495
var newPackagesNode = new XElement(
XName
.Get(PackagesConfig.PackagesNodeName),
496
from minClient in packagesNode.Attributes(
XName
.Get(PackagesConfig.MinClientAttributeName))
499
from package in packagesNode.Elements(
XName
.Get(PackagesConfig.PackageNodeName))
500
orderby package.Attributes(
XName
.Get(PackagesConfig.IdAttributeName)).FirstOrDefault()!.Value
Rules\DependenciesGroupsForEachTFMRule.cs (1)
195
return nuspec.Descendants(
XName
.Get("{" + name.NamespaceName + "}dependencies")).Elements().Attributes("targetFramework").Select(f => NuGetFramework.Parse(f.Value));
Rules\InvalidUndottedFrameworkRule.cs (7)
84
.Elements(
XName
.Get(Dependencies, ns));
87
.Elements(
XName
.Get(Group, ns));
119
foreach (var group in metadataNode.Elements(
XName
.Get(References, ns)).Elements(
XName
.Get(Group, ns)))
149
foreach (var group in metadataNode.Elements(
XName
.Get(FrameworkAssemblies, ns)).Elements(
XName
.Get(FrameworkAssembly, ns))
281
var attribute = element.Attribute(
XName
.Get(attributeName));
Rules\ReferencesInNuspecMatchRefAssetsRule.cs (2)
39
var targetFrameworks = nuspec.Descendants(
XName
.Get("{" + name.NamespaceName + "}references")).Elements().Attributes("targetFramework");
42
var filesWithoutTFM = nuspec.Descendants(
XName
.Get("{" + name.NamespaceName + "}references"))
NuGet.Protocol (64)
LegacyFeed\V2FeedParser.cs (54)
33
private static readonly
XName
_xnameEntry =
XName
.Get("entry", W3Atom);
34
private static readonly
XName
_xnameTitle =
XName
.Get("title", W3Atom);
35
private static readonly
XName
_xnameContent =
XName
.Get("content", W3Atom);
36
private static readonly
XName
_xnameLink =
XName
.Get("link", W3Atom);
37
private static readonly
XName
_xnameProperties =
XName
.Get("properties", MetadataNS);
38
private static readonly
XName
_xnameId =
XName
.Get("Id", DataServicesNS);
39
private static readonly
XName
_xnameVersion =
XName
.Get("Version", DataServicesNS);
40
private static readonly
XName
_xnameSummary =
XName
.Get("summary", W3Atom);
41
private static readonly
XName
_xnameDescription =
XName
.Get("Description", DataServicesNS);
42
private static readonly
XName
_xnameIconUrl =
XName
.Get("IconUrl", DataServicesNS);
43
private static readonly
XName
_xnameLicenseUrl =
XName
.Get("LicenseUrl", DataServicesNS);
44
private static readonly
XName
_xnameProjectUrl =
XName
.Get("ProjectUrl", DataServicesNS);
45
private static readonly
XName
_xnameTags =
XName
.Get("Tags", DataServicesNS);
46
private static readonly
XName
_xnameGalleryDetailsUrl =
XName
.Get("GalleryDetailsUrl", DataServicesNS);
47
private static readonly
XName
_xnameReportAbuseUrl =
XName
.Get("ReportAbuseUrl", DataServicesNS);
48
private static readonly
XName
_xnameDependencies =
XName
.Get("Dependencies", DataServicesNS);
49
private static readonly
XName
_xnameRequireLicenseAcceptance =
XName
.Get("RequireLicenseAcceptance", DataServicesNS);
50
private static readonly
XName
_xnameDownloadCount =
XName
.Get("DownloadCount", DataServicesNS);
51
private static readonly
XName
_xnameCreated =
XName
.Get("Created", DataServicesNS);
52
private static readonly
XName
_xnameLastEdited =
XName
.Get("LastEdited", DataServicesNS);
53
private static readonly
XName
_xnamePublished =
XName
.Get("Published", DataServicesNS);
54
private static readonly
XName
_xnameName =
XName
.Get("name", W3Atom);
55
private static readonly
XName
_xnameAuthor =
XName
.Get("author", W3Atom);
56
private static readonly
XName
_xnamePackageHash =
XName
.Get("PackageHash", DataServicesNS);
57
private static readonly
XName
_xnamePackageHashAlgorithm =
XName
.Get("PackageHashAlgorithm", DataServicesNS);
58
private static readonly
XName
_xnameMinClientVersion =
XName
.Get("MinClientVersion", DataServicesNS);
392
private static string? GetString(XElement? parent,
XName
childName)
412
private static DateTimeOffset? GetDate(XElement parent,
XName
childName)
RemoteRepositories\RemoteV2FindPackageByIdResource.cs (10)
29
private static readonly
XName
_xnameEntry =
XName
.Get("entry", "http://www.w3.org/2005/Atom");
30
private static readonly
XName
_xnameContent =
XName
.Get("content", "http://www.w3.org/2005/Atom");
31
private static readonly
XName
_xnameProperties =
XName
.Get("properties", "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata");
32
private static readonly
XName
_xnameId =
XName
.Get("Id", "http://schemas.microsoft.com/ado/2007/08/dataservices");
33
private static readonly
XName
_xnameVersion =
XName
.Get("Version", "http://schemas.microsoft.com/ado/2007/08/dataservices");
PresentationFramework-SystemXmlLinq (1)
SystemXmlLinqExtension.cs (1)
38
XName
name = ((XElement)item).Name;
Shared.Tests (29)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.GetJsonTypeInfo.g.cs (1)
408
if (type == typeof(global::System.Xml.Linq.
XName
))
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.XAttribute.g.cs (3)
73
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.
XName
>
88
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XAttribute).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.
XName
), global::System.Array.Empty<global::System.Type>(), null),
91
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.
XName
>(options, info1);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.XElement.g.cs (3)
153
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.
XName
>
168
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.
XName
), global::System.Array.Empty<global::System.Type>(), null),
171
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.
XName
>(options, info5);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.XName.g.cs (22)
15
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
>? _XName;
21
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
> XName
24
get => _XName ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
>)Options.GetTypeInfo(typeof(global::System.Xml.Linq.
XName
));
27
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
> Create_XName(global::System.Text.Json.JsonSerializerOptions options)
29
if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Xml.Linq.
XName
>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.
XName
> jsonTypeInfo))
31
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::System.Xml.Linq.
XName
>
41
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::System.Xml.Linq.
XName
>(options, objectInfo);
58
DeclaringType = typeof(global::System.Xml.Linq.
XName
),
60
Getter = static obj => ((global::System.Xml.Linq.
XName
)obj).LocalName,
68
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.
XName
).GetProperty("LocalName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79
DeclaringType = typeof(global::System.Xml.Linq.
XName
),
81
Getter = static obj => ((global::System.Xml.Linq.
XName
)obj).Namespace,
89
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.
XName
).GetProperty("Namespace", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XNamespace), global::System.Array.Empty<global::System.Type>(), null),
100
DeclaringType = typeof(global::System.Xml.Linq.
XName
),
102
Getter = static obj => ((global::System.Xml.Linq.
XName
)obj).NamespaceName,
110
AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.
XName
).GetProperty("NamespaceName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
121
private void XNameSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Xml.Linq.
XName
? value)
131
writer.WriteString(PropName_LocalName, ((global::System.Xml.Linq.
XName
)value).LocalName);
133
XNamespaceSerializeHandler(writer, ((global::System.Xml.Linq.
XName
)value).Namespace);
134
writer.WriteString(PropName_NamespaceName, ((global::System.Xml.Linq.
XName
)value).NamespaceName);
System.ComponentModel.TypeConverter (10)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (10)
199
private
XName
? _changeState;
354
if (e != null && _value.element == e.Parent && _value.name != null && (_value.name == e.Name || _value.name == (_changeState as
XName
)))
499
private readonly Func<XElement,
XName
?, IEnumerable<T>> _func;
501
internal
XName
? name;
503
public XDeferredAxis(Func<XElement,
XName
?, IEnumerable<T>> func, XElement element,
XName
? name)
543
private readonly Func<XElement,
XName
, T?> _func;
545
internal
XName
? name;
547
public 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
41
public 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
75
public 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
113
public 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
186
public 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
243
public static IEnumerable<XElement> DescendantsAndSelf(this IEnumerable<XElement?> source,
XName
? name)
273
public static IEnumerable<XElement> Elements<T>(this IEnumerable<T?> source,
XName
? name) where T : XContainer
341
private static IEnumerable<XAttribute> GetAttributes(IEnumerable<XElement?> source,
XName
? name)
360
private static IEnumerable<XElement> GetAncestors<T>(IEnumerable<T?> source,
XName
? name, bool self) where T : XNode
404
private static IEnumerable<XElement> GetDescendants<T>(IEnumerable<T?> source,
XName
? name, bool self) where T : XContainer
437
private static IEnumerable<XElement> GetElements<T>(IEnumerable<T?> source,
XName
? name) where T : XContainer
System\Xml\Linq\XAttribute.cs (4)
35
internal
XName
name;
54
public XAttribute(
XName
name, object value)
100
public
XName
Name
700
private 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>
278
public 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.
294
public 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
"/>.
333
public IEnumerable<XElement> Elements(
XName
? name)
766
internal IEnumerable<XElement> GetDescendants(
XName
? name, bool self)
793
private IEnumerable<XElement> GetElements(
XName
? name)
System\Xml\Linq\XElement.cs (31)
24
/// An element has an <see cref="
XName
"/>, optionally one or more attributes,
49
internal
XName
name = null!;
58
public XElement(
XName
name)
76
public XElement(
XName
name, object? content)
95
public XElement(
XName
name, params object?[] content) : this(name, (object)content) { }
267
public
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
"/>.
357
public 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.
373
public 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"/>.
415
public 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
"/>.
460
public IEnumerable<XElement> DescendantsAndSelf(
XName
? name)
1215
public void SetAttributeValue(
XName
name, object? value)
1255
public void SetElementValue(
XName
name, object? value)
1964
private IEnumerable<XAttribute> GetAttributes(
XName
? name)
System\Xml\Linq\XName.cs (28)
13
public 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.
72
public static
XName
Get(string expandedName)
88
/// Returns an <see cref="
XName
"/> object from a local name and a namespace.
93
public static
XName
Get(string localName, string namespaceName)
105
public 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.
150
public static bool operator ==(
XName
? left,
XName
? right)
156
/// Returns a value indicating whether two instances of <see cref="
XName
"/> are not equal.
165
public 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.
180
bool IEquatable<
XName
>.Equals(
XName
? other)
187
/// serialize the <see cref="
XName
"/>
System\Xml\Linq\XNamespace.cs (14)
26
private 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
56
public
XName
GetName(string localName)
136
/// Combines an <see cref="XNamespace"/> object with a local name to create an <see cref="
XName
"/>.
141
public 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
215
internal
XName
GetName(string localName, int index, int count)
221
XName
? 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
272
private static string ExtractLocalName(
XName
n)
System\Xml\Linq\XNode.cs (6)
205
public IEnumerable<XElement> Ancestors(
XName
? name)
359
public IEnumerable<XElement> ElementsAfterSelf(
XName
? name)
385
public IEnumerable<XElement> ElementsBeforeSelf(
XName
? name)
627
internal IEnumerable<XElement> GetAncestors(
XName
? name, bool self)
637
private IEnumerable<XElement> GetElementsAfterSelf(
XName
? name)
648
private IEnumerable<XElement> GetElementsBeforeSelf(
XName
? name)
System\Xml\Linq\XNodeBuilder.cs (1)
13
private
XName
? _attrName;
System\Xml\Linq\XNodeReader.cs (2)
399
XName
name = XNamespace.Xml.GetName("lang");
425
XName
name = XNamespace.Xml.GetName("space");
System\Xml\Linq\XStreamingElement.cs (5)
17
internal
XName
name;
24
public XStreamingElement(
XName
name)
36
public XStreamingElement(
XName
name, object? content)
47
public XStreamingElement(
XName
name, params object?[] content)
56
public
XName
Name
System\Xml\Schema\XNodeValidator.cs (3)
27
private readonly
XName
xsiTypeName;
28
private readonly
XName
xsiNilName;
219
XName
name = a.Name;
System\Xml\XPath\XNodeNavigator.cs (1)
850
XName
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)
src\runtime\artifacts\obj\System.Xml.XDocument\Release\net11.0\System.Xml.XDocument.Forwards.cs (1)
15
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.
XName
))]