221 references to XElement
aspire (8)
Commands\AddCommand.cs (1)
348new System.Xml.Linq.XElement("add",
Projects\IntegrationClosureBuilder.cs (7)
80new XElement("Target", 84new XElement("WriteLinesToFile", 91new XElement("Target", 96new XElement("WriteLinesToFile", 101new XElement("WriteLinesToFile", 106new XElement("WriteLinesToFile", 123var propertyGroup = new XElement("PropertyGroup",
aspire-tray (2)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (2)
29new XElement("plist", new XAttribute("version", "1.0"), 30new XElement("dict",
Aspire.Cli.Tests (1)
Projects\ProjectUpdaterTests.cs (1)
77document.Root!.Add(new System.Xml.Linq.XElement("Import",
Aspire.Hosting.Azure.Provisioning.Generators (3)
AspireProvisioningProxyGenerator.cs (3)
2134?? new XElement( 2185new XElement( 2221var rewritten = new XElement(
Aspire.Hosting.Dotnet (9)
DotnetProjectBuildResource.cs (9)
234new XElement( 245new XElement( 248restoreProjectsIndividually ? null : new XElement( 253restoreProjectsIndividually ? null : new XElement( 290target.AddFirst(new XElement( 299new XElement( 304new XElement( 318new( 321new XElement(
Aspire.Hosting.Maui (6)
Utilities\MauiEnvironmentHelper.cs (6)
79projectElement.Add(new XElement( 95var targetElement = new XElement( 103targetElement.Add(new XElement( 220projectElement.Add(new XElement( 242projectElement.Add(new XElement( 247new XElement(
Aspire.Templates.Tests (2)
BuildAndRunTemplateTests.cs (2)
102versions.Add(new XElement("PackageVersion", 158document.Root!.AddFirst(new XElement("Sdk",
Aspire.Tray.Tests (2)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (2)
29new XElement("plist", new XAttribute("version", "1.0"), 30new XElement("dict",
dotnet-svcutil-lib (6)
Shared\MSBuildProj.cs (6)
541this.ReferenceGroup.Add(new XElement("Reference", new XAttribute("Include", dependency.AssemblyName), new XElement("HintPath", dependency.FullPath))); 544this.PacakgeReferenceGroup.Add(new XElement("PackageReference", new XAttribute("Include", dependency.Name), new XAttribute("Version", dependency.Version))); 547this.ReferenceGroup.Add(new XElement("DotNetCliToolReference", new XAttribute("Include", dependency.Name), new XAttribute("Version", dependency.Version))); 561this.ReferenceGroup.Add(new XElement("Content", 571this.PacakgeReferenceGroup.Add(new XElement("Content", 598XElement element = new XElement(propertyName, null);
GenerateDocumentationAndConfigFiles (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
108=> new(XmlElement_CodeStyleOption, // Ensure that we use "CodeStyleOption" as the name for back compat.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
465=> new(nameof(NamingStyle),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
343return new XElement("NamingPreferencesInfo",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
26var element = new XElement(nameof(SerializableNamingRule),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
214return new XElement(nameof(SymbolSpecification),
GenerateTemplateManifest (9)
Program.cs (4)
157sources.Add(new XElement("add", new XAttribute("key", cacheSource), new XAttribute("value", sharedCache))); 162mappings.Add(new XElement("packageSource", new XAttribute("key", cacheSource), 168sources.Add(new XElement("add", 171mappings.Add(new XElement("packageSource",
TemplateRestorePlan.cs (5)
147var project = new XElement("Project", new XAttribute("Sdk", "Microsoft.NET.Sdk"), 148new XElement("PropertyGroup", 168project.Add(new XElement("ItemGroup", new XElement("PackageReference", new XAttribute("Include", name), new XAttribute("Version", value)))); 282project.Add(new XElement(groupName, elements)); 293root.AddFirst(new XElement("PropertyGroup",
illink (3)
Infrastructure.Tests (35)
Hex1bNativePublishingTests.cs (17)
406nativeItems.Add(new XElement(rid.Length == 0 ? "RuntimeTargetsCopyLocalItems" : "NativeCopyLocalItems", 416var unrelatedItem = new XElement("ResolvedFileToPublish", 421var publishItems = new XElement("ItemGroup", 422new XElement("ResolvedFileToPublish", 428publishItems.Add(new XElement("ResolvedFileToPublish", 436var project = new XDocument(new XElement("Project", 437new XElement("PropertyGroup", 440new XElement("Import", new XAttribute("Project", "Sdk.props"), new XAttribute("Sdk", "Microsoft.NET.Sdk")), 441new XElement("PropertyGroup", 446new XElement("Import", new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")), 448new XElement("Target", new XAttribute("Name", "ResolvePackageAssets"), nativeItems), 449new XElement("Target", new XAttribute("Name", "_ResolveCopyLocalAssetsForPublish"), 451new XElement("ItemGroup", new XElement("_ResolvedCopyLocalPublishAssets", 455new XElement("Target", new XAttribute("Name", "ComputeResolvedFilesToPublishList"), 457new XElement("Target", new XAttribute("Name", "ComputeFilesToPublish"), 459new XElement("Target", new XAttribute("Name", "CopyTestFiles"), 461new XElement("Copy", new XAttribute("SourceFiles", "@(ResolvedFileToPublish)"),
ResourceGeneratorMetadataTests.cs (2)
66var project = new XDocument(new XElement("Project", 69new XElement("ItemGroup",
Shared\TestTrxBuilder.cs (7)
27new XElement( 37new XElement( 94return new XElement( 98new XElement( 106return new XElement( 116new XElement( 130return new XElement(
TemplateManifest\TemplateManifestBuildTargetTests.cs (2)
34new XDocument(new XElement("Project", 35new XElement("PropertyGroup",
TemplateManifest\TemplateManifestTestEnvironment.cs (7)
50new XDocument(new XElement("configuration", 51new XElement("packageSources", 53new XElement("add", new XAttribute("key", "external"), new XAttribute("value", ExternalFeed))), 54new XElement("packageSourceMapping", 56new XElement("packageSource", new XAttribute("key", "external"), 119new XElement("metadata", 126new XElement("dependency", new XAttribute("id", dependency.Name),
Microsoft.AspNetCore.DataProtection (15)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptor.cs (1)
51var outerElement = new XElement("descriptor",
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptor.cs (2)
46var encryptionElement = new XElement("encryption", 61var rootElement = new XElement("descriptor",
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptor.cs (2)
45var encryptionElement = new XElement("encryption", 53var rootElement = new XElement("descriptor",
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptor.cs (2)
45var encryptionElement = new XElement("encryption", 52var rootElement = new XElement("descriptor",
AuthenticatedEncryption\ConfigurationModel\SecretExtensions.cs (1)
38var masterKeyElement = new XElement("masterKey",
KeyManagement\XmlKeyManager.cs (3)
387var revocationElement = new XElement(RevocationElementName, 524var keyElement = new XElement(KeyElementName, 632var revocationElement = new XElement(RevocationElementName,
XmlEncryption\DpapiNGXmlEncryptor.cs (1)
85var element = new XElement("encryptedKey",
XmlEncryption\DpapiXmlEncryptor.cs (1)
82var element = new XElement("encryptedKey",
XmlEncryption\NullXmlEncryptor.cs (1)
56var newElement = new XElement("unencryptedKey",
XmlEncryption\XmlEncryptionExtensions.cs (1)
150new XElement(XmlConstants.EncryptedSecretElementName,
Microsoft.Build.Tasks.Core (5)
AssemblyDependency\GenerateBindingRedirects.cs (3)
97new XElement( 99new XElement( 104new XElement(
AssemblyDependency\ResolveAssemblyReference.cs (2)
1411new XElement( 1416new XElement(
Microsoft.CodeAnalysis.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
108=> new(XmlElement_CodeStyleOption, // Ensure that we use "CodeStyleOption" as the name for back compat.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
465=> new(nameof(NamingStyle),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
343return new XElement("NamingPreferencesInfo",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
26var element = new XElement(nameof(SerializableNamingRule),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
214return new XElement(nameof(SymbolSpecification),
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
108=> new(XmlElement_CodeStyleOption, // Ensure that we use "CodeStyleOption" as the name for back compat.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
465=> new(nameof(NamingStyle),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
343return new XElement("NamingPreferencesInfo",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
26var element = new XElement(nameof(SerializableNamingRule),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
214return new XElement(nameof(SymbolSpecification),
Microsoft.CodeAnalysis.CodeStyle (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
108=> new(XmlElement_CodeStyleOption, // Ensure that we use "CodeStyleOption" as the name for back compat.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
465=> new(nameof(NamingStyle),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
343return new XElement("NamingPreferencesInfo",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
26var element = new XElement(nameof(SerializableNamingRule),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
214return new XElement(nameof(SymbolSpecification),
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
108=> new(XmlElement_CodeStyleOption, // Ensure that we use "CodeStyleOption" as the name for back compat.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
465=> new(nameof(NamingStyle),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
343return new XElement("NamingPreferencesInfo",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
26var element = new XElement(nameof(SerializableNamingRule),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
214return new XElement(nameof(SymbolSpecification),
Microsoft.CodeAnalysis.Workspaces (11)
Log\WorkspaceStructureLogger.cs (6)
190=> new("diagnostic", 203var element = new XElement("sourceGeneratedDocument", 246return new XElement("compilationReference", 252return new XElement("peReference", 264=> new("analyzerReference", 289return new XElement("compilation",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
108=> new(XmlElement_CodeStyleOption, // Ensure that we use "CodeStyleOption" as the name for back compat.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
465=> new(nameof(NamingStyle),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
343return new XElement("NamingPreferencesInfo",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
26var element = new XElement(nameof(SerializableNamingRule),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
214return new XElement(nameof(SymbolSpecification),
Microsoft.DotNet.Build.Manifest (4)
BlobArtifactModel.cs (1)
17public override XElement ToXml() => new XElement(
BuildModel.cs (1)
26public XElement ToXml() => new XElement(
PackageArtifactModel.cs (1)
60public override XElement ToXml() => new XElement(
PdbArtifactModel.cs (1)
29public override XElement ToXml() => new XElement(
Microsoft.DotNet.Build.Tasks.Installers (2)
src\GenerateMacOSDistributionFile.cs (2)
68.Select(component => new XElement("choice", 93.Select(component => new XElement("pkg-ref",
Microsoft.DotNet.Build.Tasks.Workloads (5)
Msi\WixDocument.cs (3)
105Package.Add(new XElement(s_wixNamespace + "Property", 140new XElement(s_wixNamespace + "Directory", 151new XElement(s_wixNamespace + "RegistryKey",
Msi\WixXmlExtensions.cs (2)
53var registryValue = new XElement(s_wixNamespace + "RegistryValue", 135var directory = new XElement(s_wixNamespace + "Directory",
Microsoft.DotNet.PackageTesting (5)
VerifyClosure.cs (5)
364linksElement.Add(new XElement(s_dgmlns + "Link", 373linksElement.Add(new XElement(s_dgmlns + "Link", 384categoriesElement.Add(new XElement(s_dgmlns + "Category", 389categoriesElement.Add(new XElement(s_dgmlns + "Category", 404parent.Add(new XElement(s_dgmlns + "Node",
Microsoft.DotNet.SharedFramework.Sdk (7)
parent\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (5)
364linksElement.Add(new XElement(s_dgmlns + "Link", 373linksElement.Add(new XElement(s_dgmlns + "Link", 384categoriesElement.Add(new XElement(s_dgmlns + "Category", 389categoriesElement.Add(new XElement(s_dgmlns + "Category", 404parent.Add(new XElement(s_dgmlns + "Node",
src\CreateFrameworkListFile.cs (2)
71var frameworkManifest = new XElement("FileList", rootAttributes); 167var element = new XElement(
Microsoft.DotNet.SourceBuild.Tasks (5)
src\UsageReport\AnnotatedUsage.cs (1)
19public XElement ToXml() => new XElement(
src\UsageReport\Usage.cs (1)
30public XElement ToXml() => new XElement(
src\UsageReport\UsageData.cs (1)
18public XElement ToXml() => new XElement(
src\UsageReport\UsagePattern.cs (1)
15public XElement ToXml() => new XElement(
src\UsageReport\XmlParsingHelpers.cs (1)
15public static XElement ToXElement(this PackageIdentity ident) => new XElement(
Microsoft.DotNet.XliffTasks (4)
Model\XlfDocument.cs (4)
50new XElement(Xliff, 55new XElement(File, 189new(TransUnit, 192new XElement(Target, new XAttribute("state", "new"), sourceNode.Source),
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (2)
Manifest.cs (2)
46var root = new XElement(ElementNames.Root, 60return new XElement(ElementNames.File,
Microsoft.ML.Maml (2)
HelpCommand.cs (2)
466select new XElement("Component", 481select new XElement("Argument",
Microsoft.NET.Build.Tasks (2)
GenerateToolsSettingsFile.cs (1)
97var dotnetCliToolNode = new XElement("DotNetCliTool",
WriteAppConfigWithSupportedRuntime.cs (1)
138new XElement(
Microsoft.NET.HostModel (3)
ComHost\RegFreeComManifest.cs (3)
31manifest.Add(new XElement(ns + "assemblyIdentity", 67XElement comClassElement = new XElement(ns + "comClass", new XAttribute("clsid", guid.ToString("B")), new XAttribute("threadingModel", "Both")); 90XElement typeLibElement = new XElement(ns + "typelib",
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (2)
BlazorWriteSatelliteAssemblyFile.cs (1)
34root.Add(new XElement("Assembly",
CreateBlazorTrimmerRootDescriptorFile.cs (1)
61roots.Add(new XElement("assembly",
Microsoft.NET.Sdk.Publish.Tasks (1)
Tasks\GenerateEnvTransform.cs (1)
77new XElement("environmentVariable", new XAttribute("name", envVariable.Key),
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
GeneratePackageAssetsTargetsFile.cs (1)
33var manifestItem = new XElement("StaticWebAssetPackageManifest",
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
57itemGroup.Add(new XElement(nameof(StaticWebAssetEndpoint),
GenerateStaticWebAssetsPropsFile.cs (1)
109itemGroup.Add(new XElement("StaticWebAsset",
Legacy\GenerateStaticWebAssetsPropsFile50.cs (1)
62itemGroup.Add(new XElement("StaticWebAsset",
Legacy\GenerateV1StaticWebAssetsManifest.cs (2)
38var root = new XElement( 123nodes.Add(new XElement("ContentRoot",
NuGet.Commands (7)
RestoreCommand\Utility\BuildAssetsUtils.cs (7)
134doc.Root.Add(new XElement(Namespace + "Target", 213new XElement(Namespace + "PropertyGroup", 222new XElement(Namespace + "ItemGroup", 235new XElement(Namespace + "Project", 244return new XElement(Namespace + propertyName, 256return new XElement(Namespace + "Import", 263var entry = new XElement(Namespace + item.BuildAction.Value,
NuGet.Configuration (1)
Settings\Items\CredentialsItem.cs (1)
223var element = new XElement(XmlUtility.GetEncodedXMLName(ElementName),
NuGet.Packaging (16)
PackageCreation\Authoring\Manifest.cs (2)
101new XElement(schemaNamespace + "package", 105Files.Select(file => new XElement(schemaNamespace + "file",
PackageCreation\Authoring\PackageBuilder.cs (9)
1163new XElement(relationships + "Relationships", 1164new XElement(relationships + "Relationship", 1168new XElement(relationships + "Relationship", 1188XElement element = new XElement(content + "Types", 1189new XElement(content + "Default", 1192new XElement(content + "Default", 1199new XElement(content + "Default", 1208new XElement(content + "Override", 1236new XElement(core + "coreProperties",
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (4)
180var groupElem = new XElement( 197return new XElement(ns + parentName, childElements.ToArray()); 244new XElement(ns + FrameworkAssembly, 286return new XElement(ns + NuspecUtility.License, metadata.License, attributes.Where(xAtt => xAtt != null));
PackagesConfigWriter.cs (1)
495var newPackagesNode = new XElement(XName.Get(PackagesConfig.PackagesNodeName),
Roslyn.Diagnostics.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
108=> new(XmlElement_CodeStyleOption, // Ensure that we use "CodeStyleOption" as the name for back compat.
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
465=> new(nameof(NamingStyle),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
343return new XElement("NamingPreferencesInfo",
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (1)
26var element = new XElement(nameof(SerializableNamingRule),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
214return new XElement(nameof(SymbolSpecification),