216 references to Descendants
aspire (2)
Projects\FallbackProjectParser.cs (2)
178.Descendants("PackageReference") 211.Descendants("ProjectReference")
dotnet.Tests (4)
PackagedCommandTests.cs (3)
56var toolReference = project.Descendants(ns + "DotNetCliToolReference") 95project.Descendants(ns + "DotNetCliToolReference") 99var toolReference = project.Descendants(ns + "DotNetCliToolReference")
TestAssetExtensions.cs (1)
25project.Root.Descendants(ns + "PackageReference")
dotnet-svcutil-lib (1)
Shared\MSBuildProj.cs (1)
429var ele = doc.Root?.Descendants(elementStr).FirstOrDefault();
IIS.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (3)
153var eventElements = xDocument.Descendants(nameSpace + "Event"); 156var eventElementWithOpCode = eventElement.Descendants(nameSpace + "RenderingInfo").Single().Descendants(nameSpace + "Opcode").Single();
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
88.Descendants("attribute")
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (1)
104.Descendants("system.webServer")
IIS.LongTests (11)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
88.Descendants("attribute")
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
549.Descendants("system.webServer")
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
388.Descendants("system.webServer") 577element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 582element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 587element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1333element.Descendants("bindings") 1360element.Descendants("bindings") 1365element.Descendants("access") 1407element.Descendants("bindings")
IIS.NewHandler.FunctionalTests (11)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
88.Descendants("attribute")
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
549.Descendants("system.webServer")
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
388.Descendants("system.webServer") 577element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 582element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 587element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1333element.Descendants("bindings") 1360element.Descendants("bindings") 1365element.Descendants("access") 1407element.Descendants("bindings")
IIS.NewShim.FunctionalTests (11)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
88.Descendants("attribute")
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
549.Descendants("system.webServer")
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
388.Descendants("system.webServer") 577element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 582element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 587element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1333element.Descendants("bindings") 1360element.Descendants("bindings") 1365element.Descendants("access") 1407element.Descendants("bindings")
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
88.Descendants("attribute")
IISExpress.FunctionalTests (15)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (3)
153var eventElements = xDocument.Descendants(nameSpace + "Event"); 156var eventElementWithOpCode = eventElement.Descendants(nameSpace + "RenderingInfo").Single().Descendants(nameSpace + "Opcode").Single();
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (1)
104.Descendants("system.webServer")
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
549.Descendants("system.webServer")
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
388.Descendants("system.webServer") 577element => element.Descendants("aspNetCore").Single().SetAttributeValue("processPath", "") 582element => element.Descendants("aspNetCore").Single().SetAttributeValue("hostingModel", "asdf") 587element => element.Descendants("aspNetCore").Single().GetOrAdd("environmentVariables").GetOrAdd("add") 1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName); 1333element.Descendants("bindings") 1360element.Descendants("bindings") 1365element.Descendants("access") 1407element.Descendants("bindings")
UpgradeFeatureDetectionTests.cs (1)
66element => element.Descendants("webSocket")
Microsoft.AspNetCore.Authentication.Test (2)
OpenIdConnect\TestSettings.cs (2)
54var forms = xdoc.Descendants("form"); 92var forms = xdoc.Descendants("form");
Microsoft.AspNetCore.DataProtection (1)
XmlEncryption\XmlEncryptionExtensions.cs (1)
39var elementWhichRequiresDecryption = doc.Descendants(XmlConstants.EncryptedSecretElementName).FirstOrDefault();
Microsoft.AspNetCore.OpenApi.SourceGenerators (7)
XmlCommentGenerator.Parser.cs (1)
60var members = xml.Descendants("member");
XmlComments\XmlComment.cs (5)
69var listElements = document.Descendants(DocumentationCommentXmlNames.ListElementName).ToArray(); 100var codeElements = document.Descendants(tagName).ToArray(); 114var paramRefElements = document.Descendants(DocumentationCommentXmlNames.ParameterReferenceElementName).ToArray(); 129var typeParamRefElements = document.Descendants(DocumentationCommentXmlNames.TypeParameterReferenceElementName).ToArray(); 147var paraElements = document.Descendants(DocumentationCommentXmlNames.ParaElementName).ToArray();
XmlComments\XmlComment.InheritDoc.cs (1)
231var typeParameterRefs = document.Descendants(DocumentationCommentXmlNames.TypeParameterReferenceElementName).ToImmutableArray();
Microsoft.AspNetCore.Rewrite (4)
IISUrlRewrite\RewriteMapParser.cs (1)
15var mapsElement = xmlRoot.Descendants(RewriteTags.RewriteMaps).SingleOrDefault();
IISUrlRewrite\UrlRewriteFileParser.cs (3)
24var xmlRoot = xmlDoc.Descendants(RewriteTags.Rewrite).FirstOrDefault(); 34ParseRules(xmlRoot.Descendants(RewriteTags.GlobalRules).FirstOrDefault(), result, global: true); 35ParseRules(xmlRoot.Descendants(RewriteTags.Rules).FirstOrDefault(), result, global: false);
Microsoft.AspNetCore.Rewrite.Tests (1)
IISUrlRewrite\RewriteMapParserTests.cs (1)
28var xmlRoot = xmlDoc.Descendants(RewriteTags.Rewrite).FirstOrDefault();
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
155var aspNetCoreSection = webConfig.Descendants("aspNetCore")
xunit\IISExpressAncmSchema.cs (1)
45.Descendants("attribute")
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (11)
IISDeployer.cs (1)
138.Descendants("system.webServer")
IISDeployerBase.cs (2)
112.Descendants("system.webServer") 127.Descendants("system.webServer")
IISDeploymentParameterExtensions.cs (6)
31element.Descendants("binding") 35element.Descendants("access") 46element.Descendants("binding") 50element.Descendants("access") 211var aspNetCoreElement = config.Descendants("aspNetCore").Single(); 221var aspNetCoreElement = config.Descendants("aspNetCore").Single();
WebConfigHelpers.cs (2)
15.Descendants("system.webServer") 27.Descendants("system.webServer")
Microsoft.CodeAnalysis.Analyzers (1)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ResourceStringsFormat.cs (1)
76foreach (var dataElement in parsedDocument.Descendants("data"))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
DocumentationComments\CrefTests.cs (2)
6888var cref = xml.Descendants("see").Single().Attribute("cref").Value; 6912var cref = xml.Descendants("see").Single().Attribute("cref").Value;
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
AbstractResxGenerator.cs (1)
401foreach (var node in XDocument.Load(new SourceTextReader(text)).Descendants("data"))
Microsoft.CodeAnalysis.Workspaces (1)
Shared\Extensions\ISymbolExtensions.cs (1)
425var typeParameterRefs = document.Descendants(DocumentationCommentXmlNames.TypeParameterReferenceElementName).ToImmutableArray();
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\BuildHostProcessManager.cs (1)
401var propertyGroups = document.Descendants("PropertyGroup");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
SolutionGeneration.cs (1)
269var propertyGroup = document.Root.Descendants(XName.Get("PropertyGroup", NS)).First();
VisualStudioMSBuildWorkspaceTests.cs (1)
2481var projectReferenceItems = document.Descendants(XName.Get("ProjectReference", MSBuildNamespace));
Microsoft.DotNet.Arcade.Sdk (1)
src\GenerateResxSource.cs (1)
106foreach (var node in XDocument.Load(ResourceFile).Descendants("data"))
Microsoft.DotNet.Build.Tasks.Packaging (1)
GenerateNuSpec.cs (1)
164var licenseUrlElement = nuspec.Descendants(NuSpecXmlNamespace + "licenseUrl").Single();
Microsoft.DotNet.Build.Tasks.Workloads (2)
Msi\WorkloadPackGroupMsi.wix.cs (2)
94var componentGroupRefElement = productDoc.Root.Descendants(ns + "ComponentGroupRef").Single(); 102var registryKeyElement = registryDoc.Root.Descendants(ns + "RegistryKey").Single();
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\NuGetVersionUpdater.cs (1)
293Descendants(XName.Get("dependency", package.NuspecXmlns)) ?? Array.Empty<XElement>();
Microsoft.DotNet.SignTool.Tests (1)
FakeBuildEngine.cs (1)
44var itemGroupNode = xml.Descendants("ItemGroup");
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WriteUsageReports.cs (1)
82foreach (var x in xml.Descendants("Package"))
Microsoft.DotNet.XliffTasks (8)
Model\ResxDocument.cs (2)
18foreach (XElement node in Document.Descendants("data")) 59foreach (XElement node in Document.Descendants("data"))
Model\VsctDocument.cs (3)
20foreach (XElement strings in Document.Descendants(Document.Root.Name.Namespace + "Strings")) 64foreach (XElement strings in Document.Descendants(Document.Root.Name.Namespace + "Strings")) 79foreach (XElement imageTag in Document.Descendants(Document.Root.Name.Namespace + "Bitmap"))
Model\XlfDocument.cs (3)
108foreach (XElement unitElement in bodyElement.Descendants(TransUnit).ToList()) 264foreach (XElement element in _document.Descendants(TransUnit)) 280(_document.Descendants(TransUnit)
Microsoft.NET.Build.Tests (5)
GivenThatWeWantToBuildACppCliNonLibraryProject.cs (1)
42foreach (var configurationType in project.Root.Descendants(ns + "ConfigurationType"))
GivenThatWeWantToBuildACppCliProject.cs (3)
127.Descendants(ns + "PropertyGroup") 197project.Root.Descendants(ns + "PropertyGroup") 215XElement propertyGroup = project.Root.Descendants(ns + "PropertyGroup").First();
SourceLinkTests.cs (1)
75var propertyGroup = p.Root.Descendants(ns + "PropertyGroup").First();
Microsoft.NET.Pack.Tests (2)
GivenThatWeWantToPackACppCliProject.cs (2)
35XElement itemGroup = project.Root.Descendants(ns + "ItemGroup").First(); 46XElement propertyGroup = project.Root.Descendants(ns + "PropertyGroup").First();
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (2)
WasmAoTPublishIntegrationTest.cs (2)
197document.Descendants("PropertyGroup").First().Add(new XElement("RunAoTCompilation", "true")); 199foreach (var item in document.Descendants("PackageReference"))
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (11)
BlazorWasmStaticWebAssetsIntegrationTest.cs (10)
222document.Descendants("TargetFramework").Single().ReplaceNodes("net5"); 226document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.1"); 227document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0")); 231document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.1"); 232document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0")); 273document.Descendants("TargetFramework").Single().ReplaceNodes("net5"); 277document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.1"); 278document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0")); 282document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.1"); 283document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0"));
WasmPublishIntegrationTest.cs (1)
1225var projectReference = doc.Descendants("ProjectReference").Single();
Microsoft.NET.Sdk.Publish.Tasks (2)
Tasks\GenerateEnvTransform.cs (1)
82updatedContent.Descendants("environmentVariables").Single().Add(envVariableTransform);
WebConfigTransform.cs (1)
24var firstAspNetCoreElement = webConfig.Root?.Descendants(aspNetCoreElementName).FirstOrDefault();
Microsoft.NET.Sdk.Publish.Tasks.Tests (40)
Tasks\GenerateEnvTransformTests.cs (4)
125Assert.Equal(expected, envDoc.Descendants("environmentVariable").Count()); 185Assert.Equal(expected, XDocument.Parse(File.ReadAllText(webConfigPath)).Root.Descendants("environmentVariable").Count()); 247Assert.Equal(expected + 1, XDocument.Parse(File.ReadAllText(webConfigPath)).Root.Descendants("environmentVariable").Count()); 315Assert.Equal(expected, XDocument.Parse(File.ReadAllText(webConfigPath)).Root.Descendants("environmentVariable").Count());
Tasks\TransformXmlTests.cs (6)
78Assert.True(XDocument.Parse(File.ReadAllText(sourceFile)).Descendants("handlers").Count() == 1); 79Assert.True(XDocument.Parse(File.ReadAllText(sourceFile)).Descendants("aspNetCore").Count() == 1); 81Assert.True(XDocument.Parse(File.ReadAllText(outputFile)).Descendants("handlers").Count() == 0); 82Assert.True(XDocument.Parse(File.ReadAllText(outputFile)).Descendants("aspNetCore").Count() == 0); 123Assert.True(XDocument.Parse(File.ReadAllText(sourceFile)).Descendants("environmentVariable").Count() == 0); 124Assert.True(XDocument.Parse(File.ReadAllText(outputFile)).Descendants("environmentVariable").Count() == 1);
WebConfigTransformTests.cs (30)
55input.Descendants(elementName).Remove(); 74input.Descendants(elementName).Single().SetAttributeValue(attributeName, attributeValue); 77Assert.Equal(attributeValue, (string)output.Descendants(elementName).Single().Attribute(attributeName)); 89input.Descendants(elementName).Single().SetAttributeValue(attributeName, attributeValue); 102Assert.Equal(attributeValue, (string)output.Descendants(elementName).Single().Attribute(attributeName)); 111Assert.Equal(attributeValue, (string)output.Descendants(elementName).Single().Attribute(attributeName)); 121Assert.Equal("AspNetCoreModule", (string)output.Descendants(elementName).Single().Attribute(attributeName)); 133Assert.Equal(attributeValue, (string)output.Descendants(elementName).Single().Attribute(attributeName)); 157Assert.Equal(attributeValue, (string)output.Descendants(elementName).Single().Attribute(attributeName)); 176Assert.Null((string)output.Descendants(elementName).Single().Attribute(attributeName)); 194Assert.Equal("Staging", (string)output.Descendants("environmentVariable").Single().Attribute("value")); 228.Descendants("aspNetCore").Single().Attribute("processPath"); 237input.Descendants("add").Single().SetAttributeValue("name", "aspnetcore"); 250input.Descendants("aspNetCore").Single().Add(envVarElement); 254.Descendants("environmentVariable").SingleOrDefault(e => (string)e.Attribute("name") == "ENVVAR"))); 258Assert.Equal("Test", (string)output.Descendants("environmentVariable").SingleOrDefault(e => (string)e.Attribute("name") == "ASPNETCORE_ENVIRONMENT").Attribute("value")); 265input.Descendants("aspNetCore").Attributes("stdoutLogEnabled").Remove(); 281var aspNetCoreElement = input.Descendants("aspNetCore").Single(); 301var aspNetCoreElement = input.Descendants("aspNetCore").Single(); 307input.Descendants("aspNetCore").Single().SetAttributeValue("stdoutLogEnabled", stdoutLogEnabledValue); 320input.Descendants("aspNetCore").Attributes().Remove(); 323.Descendants("aspNetCore").Single(); 340(string)output.Descendants("aspNetCore").Single().Attribute("stdoutLogFile")); 348.Descendants("aspNetCore").Single(); 361.Descendants("aspNetCore").Single(); 391input.Descendants("aspNetCore").Single().SetAttributeValue("arguments", inputArguments); 395.Descendants("aspNetCore").Single(); 417input.Descendants("aspNetCore").Single().SetAttributeValue("arguments", inputArguments); 421.Descendants("aspNetCore").Single(); 432input.Descendants(elementName).Remove();
Microsoft.NET.Sdk.StaticWebAssets.Tests (36)
LegacyStaticWebAssetsV1IntegrationTest.cs (12)
22document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.1"); 23document.Descendants("FrameworkReference").Single().Remove(); 24document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0")); 28document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.0"); 29document.Descendants("FrameworkReference").Single().Remove(); 30document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0")); 85document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.1"); 86document.Descendants("FrameworkReference").Single().Remove(); 87document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0")); 91document.Descendants("TargetFramework").Single().ReplaceNodes("netstandard2.0"); 92document.Descendants("FrameworkReference").Single().Remove(); 93document.Descendants("PropertyGroup").First().Add(new XElement("RazorLangVersion", "3.0"));
ScopedCssIntegrationTests.cs (4)
456document.Descendants("TargetFramework").Single().ReplaceNodes("net5.0"); 460document.Descendants("TargetFramework").Single().ReplaceNodes("net5.0"); 504document.Descendants("TargetFramework").Single().ReplaceNodes("net5.0"); 508document.Descendants("TargetFramework").Single().ReplaceNodes("net5.0");
StaticWebAssetsCompressionIntegrationTest.cs (1)
107xml.Descendants("PropertyGroup")
StaticWebAssetsPackIntegrationTest.cs (19)
102var tfm = project.Root.Descendants("TargetFramework").Single(); 202var tfm = document.Descendants("TargetFramework").Single(); 206document.Descendants("AddRazorSupportForMvc").SingleOrDefault()?.Remove(); 207document.Descendants("FrameworkReference").SingleOrDefault()?.Remove(); 242var tfm = document.Descendants("TargetFramework").Single(); 246document.Descendants("AddRazorSupportForMvc").SingleOrDefault()?.Remove(); 247document.Descendants("FrameworkReference").SingleOrDefault()?.Remove(); 285var tfm = document.Descendants("TargetFramework").Single(); 289document.Descendants("AddRazorSupportForMvc").SingleOrDefault()?.Remove(); 290document.Descendants("FrameworkReference").SingleOrDefault()?.Remove(); 326var tfm = document.Descendants("TargetFramework").Single(); 330document.Descendants("AddRazorSupportForMvc").SingleOrDefault()?.Remove(); 331document.Descendants("FrameworkReference").SingleOrDefault()?.Remove(); 366var tfm = document.Descendants("TargetFramework").Single(); 370document.Descendants("AddRazorSupportForMvc").SingleOrDefault()?.Remove(); 371document.Descendants("FrameworkReference").SingleOrDefault()?.Remove(); 1452var tfm = document.Descendants("TargetFramework").Single(); 1456document.Descendants("AddRazorSupportForMvc").SingleOrDefault()?.Remove(); 1457document.Descendants("FrameworkReference").SingleOrDefault()?.Remove();
Microsoft.NET.TestFramework (2)
TestAsset.cs (2)
164project.Root.Descendants(ns + elementName) 294XElement? msTestVersionElement = doc.Descendants("MSTestPackageVersion").FirstOrDefault();
Microsoft.VisualStudio.LanguageServices.Implementation (1)
SolutionExplorer\RuleSetDocumentExtensions.cs (1)
35.Descendants("Rule")
System.ComponentModel.TypeConverter (1)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (1)
207return _value = new XDeferredAxis<XElement>((e, n) => n != null ? e.Descendants(n) : e.Descendants(), (component as XElement)!, null);
System.Private.CoreLib.Generators (1)
NativeRuntimeEventSourceGenerator.cs (1)
47.Descendants(EventNs + "provider")
Text.Analyzers (1)
CodeAnalysisDictionary.cs (1)
102=> document.Descendants(section).SelectMany(section => section.Elements(property)).Select(element => element.Value.Trim());