168 references to Element
BuildBoss (2)
ProjectUtil.cs (2)
120var referenceOutputAssemblyValue = r.Element(Namespace.GetName("ReferenceOutputAssembly"))?.Value ?? r.Attribute(XName.Get("ReferenceOutputAssembly"))?.Value; 130var projectElement = r.Element(Namespace.GetName("Project"));
ConfigurationSchemaGenerator (4)
ConfigSchemaEmitter.cs (4)
437var memberRoot = doc.Element("member") ?? doc.Element("doc"); 438var summary = memberRoot?.Element("summary"); 452var value = memberRoot?.Element("value")?.ToString();
dotnet-svcutil-lib (5)
Shared\MSBuildProj.cs (3)
180msbuildProj.ProjectNode = projDefinition.Element(msbuildNS + "Project"); 302XElement hintPath = reference.Element("HintPath"); 303XElement path = reference.Element("Path");
Shared\Utilities\RuntimeEnvironmentHelper.cs (2)
82var pkgSourcesNode = doc.Element("configuration")?.Element("packageSources");
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
158var requestStatus = eventElement.Element(nameSpace + "EventData").Descendants().Where(el => el.Attribute("Name").Value == "requestStatus").SingleOrDefault();
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName);
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName);
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName);
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
158var requestStatus = eventElement.Element(nameSpace + "EventData").Descendants().Where(el => el.Attribute("Name").Value == "requestStatus").SingleOrDefault();
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1314element.Descendants("site").Single().Element("application").SetAttributeValue("path", "/" + appName);
Microsoft.AspNetCore.DataProtection (18)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializer.cs (2)
33var encryptionElement = element.Element("encryption")!; 39var validationElement = element.Element("validation")!;
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializer.cs (3)
35var encryptionElement = element.Element("encryption")!; 40var hashElement = element.Element("hash")!; 44Secret masterKey = ((string)element.Element("masterKey"))!.ToSecret();
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptorDeserializer.cs (2)
34var encryptionElement = element.Element("encryption")!; 39Secret masterKey = ((string)element.Element("masterKey")!).ToSecret();
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializer.cs (3)
34var encryptionElement = element.Element("encryption")!; 38var validationElement = element.Element("validation")!; 41Secret masterKey = ((string)element.Element("masterKey")!).ToSecret();
KeyManagement\XmlKeyManager.cs (6)
305DateTimeOffset creationDate = (DateTimeOffset)keyElement.Element(CreationDateElementName)!; 306DateTimeOffset activationDate = (DateTimeOffset)keyElement.Element(ActivationDateElementName)!; 307DateTimeOffset expirationDate = (DateTimeOffset)keyElement.Element(ExpirationDateElementName)!; 350string keyIdAsString = (string)revocationElement.Element(KeyElementName)!.Attribute(IdAttributeName)!; 354DateTimeOffset massRevocationDate = (DateTimeOffset)revocationElement.Element(RevocationDateElementName)!; 576var descriptorElement = keyElement.Element(DescriptorElementName);
XmlEncryption\DpapiNGXmlDecryptor.cs (1)
59var protectedSecret = Convert.FromBase64String((string)encryptedElement.Element("value")!);
XmlEncryption\DpapiXmlDecryptor.cs (1)
57var protectedSecret = Convert.FromBase64String((string)encryptedElement.Element("value")!);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (4)
ServerStreamingServerCallHandlerTests.cs (2)
249Assert.Equal("Hello TestName! 1", (string)responseXml1.Element("message")!); 256Assert.Equal("Hello TestName! 2", (string)responseXml2.Element("message")!);
UnaryServerCallHandlerTests.cs (2)
1128var name = (string)responseXml.Element("name")!; 1368Assert.Equal(@"Hello world", (string)responseXml.Element("message")!);
Microsoft.AspNetCore.Mvc.FunctionalTests (19)
AsyncEnumerableTestBase.cs (1)
97var name = element.Element(XName.Get("Name", @namespace));
XmlDataContractSerializerFormattersWrappingTest.cs (9)
238Assert.Equal("404", root.Element(root.Name.Namespace.GetName("status"))?.Value); 239Assert.Equal("Not Found", root.Element(root.Name.Namespace.GetName("title"))?.Value); 240Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.5", root.Element(root.Name.Namespace.GetName("type"))?.Value); 242Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value); 281Assert.Equal("400", root.Element(root.Name.Namespace.GetName("status"))?.Value); 282Assert.Equal("One or more validation errors occurred.", root.Element(root.Name.Namespace.GetName("title"))?.Value); 283var mvcErrors = root.Element(root.Name.Namespace.GetName("MVC-Errors")); 285Assert.Equal("The State field is required.", mvcErrors.Element(root.Name.Namespace.GetName("State"))?.Value); 287Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value);
XmlSerializerFormattersWrappingTest.cs (9)
221Assert.Equal("404", root.Element(root.Name.Namespace.GetName("status"))?.Value); 222Assert.Equal("Not Found", root.Element(root.Name.Namespace.GetName("title"))?.Value); 223Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.5", root.Element(root.Name.Namespace.GetName("type"))?.Value); 225Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value); 263Assert.Equal("400", root.Element(root.Name.Namespace.GetName("status"))?.Value); 264Assert.Equal("One or more validation errors occurred.", root.Element(root.Name.Namespace.GetName("title"))?.Value); 265var mvcErrors = root.Element(root.Name.Namespace.GetName("MVC-Errors")); 267Assert.Equal("The State field is required.", mvcErrors.Element(root.Name.Namespace.GetName("State"))?.Value); 269Assert.NotNull(root.Element(root.Name.Namespace.GetName("traceId"))?.Value);
Microsoft.AspNetCore.Rewrite (3)
IISUrlRewrite\UrlRewriteFileParser.cs (3)
74var match = rule.Element(RewriteTags.Match); 80var action = rule.Element(RewriteTags.Action); 87ParseConditions(rule.Element(RewriteTags.Conditions), builder, patternSyntax);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (7)
IISDeploymentParameterExtensions.cs (5)
197.Element("sites") 198.Element("siteDefaults") 199.Element("traceFailedRequestsLogging"); 244(webServerElement.Element("modules") ?? 246.Element("location")
XElementExtensions.cs (2)
12var existing = element.Element(name); 23var existing = element.Element(name);
Microsoft.Build.Tasks.Core (4)
GenerateResource.cs (2)
3063foreach (XElement dataElem in doc.Element("root").Elements("data")) 3066string value = dataElem.Element("value").Value;
ResourceHandling\MSBuildResXReader.cs (2)
32foreach (XElement elem in doc.Element("root").Elements()) 118XElement valueElement = elem.Element("value");
Microsoft.CodeAnalysis.CodeStyle (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
333element.Element("SymbolSpecifications").Elements(nameof(SymbolSpecification)) 335element.Element("NamingStyles").Elements(nameof(NamingStyle)) 337element.Element("NamingRules").Elements(nameof(SerializableNamingRule))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
286symbolKindList: GetSymbolKindListFromXElement(symbolSpecificationElement.Element(nameof(ApplicableSymbolKindList))), 287accessibilityList: GetAccessibilityListFromXElement(symbolSpecificationElement.Element(nameof(ApplicableAccessibilityList))), 288modifiers: GetModifierListFromXElement(symbolSpecificationElement.Element(nameof(RequiredModifierList))));
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
SymbolsTests\Source\PropertyTests.vb (3)
4389_propertiesCallBaseSource.Element("file").SetElementValue("more_code", 4399_propertiesCallBaseSource.Element("file").SetElementValue("more_code", 4408_propertiesCallBaseSource.Element("file").SetElementValue("more_code",
Microsoft.CodeAnalysis.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
333element.Element("SymbolSpecifications").Elements(nameof(SymbolSpecification)) 335element.Element("NamingStyles").Elements(nameof(NamingStyle)) 337element.Element("NamingRules").Elements(nameof(SerializableNamingRule))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
286symbolKindList: GetSymbolKindListFromXElement(symbolSpecificationElement.Element(nameof(ApplicableSymbolKindList))), 287accessibilityList: GetAccessibilityListFromXElement(symbolSpecificationElement.Element(nameof(ApplicableAccessibilityList))), 288modifiers: GetModifierListFromXElement(symbolSpecificationElement.Element(nameof(RequiredModifierList))));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace_XmlConsumption.cs (2)
400var compilationOptionsElement = projectElement.Element(CompilationOptionsElementName); 615var optionsElement = documentElement.Element(ParseOptionsElementName);
Microsoft.DotNet.Arcade.Sdk (5)
src\ExtractNgenMethodList.cs (1)
55var parentElement = document.Root.Element("MethodProfilingData");
src\SourceBuild\AddSourceToNuGetConfig.cs (1)
41.Element(CreateQualifiedName("packageSources"));
src\SourceBuild\ReadSourceBuildIntermediateNupkgDependencies.cs (3)
57XElement sourceBuildElement = d.Element(CreateQualifiedName("SourceBuild")); 83string dependencyUri = d.Element(CreateQualifiedName("Uri"))?.Value; 84string dependencySha = d.Element(CreateQualifiedName("Sha"))?.Value;
Microsoft.DotNet.Build.Tasks.Installers (2)
src\GenerateMacOSDistributionFile.cs (1)
94var optionsElement = document.Root.Element("options");
src\StabilizeWixFileId.cs (1)
67XElement[] matchingFileElements = content.Element(GetQualifiedName("Wix"))
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
217foreach (var file in frameworkList.Element("FileList").Elements("File"))
Microsoft.DotNet.Build.Tasks.VisualStudio (2)
Vsix\FinalizeInsertionVsixFile.cs (2)
79var installationElement = document.Element(XName.Get("PackageManifest", VsixNamespace))?.Element(XName.Get("Installation", VsixNamespace));
Microsoft.DotNet.Build.Tasks.Workloads (1)
Msi\MsiPayloadPackageProject.wix.cs (1)
58var itemGroup = proj.Root.Element("ItemGroup");
Microsoft.DotNet.NuGetRepack.Tasks (12)
src\NuGetVersionUpdater.cs (8)
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)); 290Element(XName.Get("package", package.NuspecXmlns))?. 291Element(XName.Get("metadata", package.NuspecXmlns))?. 292Element(XName.Get("dependencies", package.NuspecXmlns))?.
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.SourceBuild.Tasks (6)
src\UsageReport\UsageData.cs (5)
45CreatedByRid = xml.Element(nameof(CreatedByRid)) 48(xml.Element(nameof(ProjectDirectories))?.Elements()).NullAsEmpty() 52(xml.Element(nameof(NeverRestoredTarballPrebuilts))?.Elements()).NullAsEmpty() 56(xml.Element(nameof(IgnorePatterns))?.Elements()).NullAsEmpty() 60(xml.Element(nameof(Usages))?.Elements()).NullAsEmpty()
src\UsageReport\WriteUsageReports.cs (1)
189?.Element(snapshot.Xml
Microsoft.DotNet.VersionTools (1)
BuildManifest\Model\BuildModel.cs (1)
37SigningInformation = SigningInformationModel.Parse(xml.Element("SigningInformation")),
Microsoft.DotNet.XliffTasks (21)
Model\ResxDocument.cs (3)
27XElement valueElement = node.Element("value"); 29string comment = node.Element("comment")?.Value ?? ""; 63XElement valueNodeOfFileRef = node.Element("value");
Model\XElementExtensions.cs (13)
20transUnitElement.Element(Target)?.Value 21?? transUnitElement.Element(Source).Value; 31XElement targetElement = transUnitElement.Element(Target); 34XElement sourceElement = transUnitElement.Element(Source); 54transUnitElement.Element(Target)?.Attribute("state")?.Value 65XElement targetElement = transUnitElement.Element(Target); 68XElement sourceElement = transUnitElement.Element(Source); 91transUnitElement.Element(Source).Value; 99transUnitElement.Element(Source).Value = value; 107transUnitElement.Element(Note)?.Value; 118XElement noteElement = transUnitElement.Element(Note); 121XElement priorElement = transUnitElement.Element(Target) ?? transUnitElement.Element(Source);
Model\XlfDocument.cs (5)
89XElement fileElement = _document.Root.Element(File); 98XElement bodyElement = fileElement.Element(Body); 99XElement groupElement = bodyElement.Element(Group); 226XElement fileElement = _document.Root.Element(File); 227XElement bodyElement = fileElement.Element(Body);
Microsoft.Extensions.FileProviders.Embedded (1)
Manifest\ManifestParser.cs (1)
117var element = container.Element(elementName);
Microsoft.Maui.Resizetizer (15)
GeneratePackageAppxManifest.cs (10)
81 var identity = appx.Root.Element(xidentity); 125 var properties = appx.Root.Element(xproperties); 136 var xelem = properties.Element(xname); 145 var xelem = properties.Element(xname); 171 var applications = appx.Root.Element(xapplications); 180 var application = applications.Element(xapplication); 189 var visual = application.Element(xvisual); 252 var tile = visual.Element(xtile); 309 var showname = tile.Element(xshowname); 328 var splash = visual.Element(xsplash);
GenerateTizenManifest.cs (5)
85 var uiApplication = manifest.Element(xmlns + UiApplicationName); 99 var uiApplication = manifest.Element(xmlns + UiApplicationName); 122 var label = uiApplication.Element(xmlns + LabelName); 134 var uiApplicationElement = manifestElement.Element(xmlns + UiApplicationName); 162 var splashscreensElement = uiApplicationElement.Element(xmlns + SplashScreensName);
Microsoft.VisualStudio.LanguageServices (3)
Snippets\SnippetExpansionClient.cs (3)
310var codeNode = snippetNode.Element(XName.Get("Code", ns)); 1080var referencesNode = snippetNode.Element(XName.Get("References", snippetNode.Name.NamespaceName)); 1096var assemblyElement = reference.Element(assemblyXmlName);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Snippets\CSharpSnippetExpansionLanguageHelper.cs (2)
78var importsNode = snippetNode.Element(XName.Get("Imports", snippetNode.Name.NamespaceName)); 117var namespaceElement = import.Element(namespaceXmlName);
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
Snippets\CSharpSnippetExpansionClientTests.vb (1)
369snippetNode.Element("Imports").Add(<Import>
Snippets\VisualBasicSnippetExpansionClientTests.vb (1)
390snippetNode.Element("Imports").Add(<Import>
System.ComponentModel.TypeConverter (4)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (4)
260return _value = new XDeferredSingleton<XElement>((e, n) => e.Element(n), (component as XElement)!, null); 271if (e != null && _value.element == e.Parent && _value.name == e.Name && _value.element.Element(_value.name) == e) 288if (_value.element == e.Parent && _value.name == e.Name && _value.element.Element(_value.name) == e) 311_changeState = e != null && _value.element == e.Parent && _value.name == e.Name && _value.element.Element(_value.name) == e ? e : null;
System.Private.Xml.Linq (1)
System\Xml\Linq\XElement.cs (1)
1257XElement? e = Element(name);