288 references to Add
aspire (37)
Packaging\NuGetConfigMerger.cs (17)
184doc.Add(configuration); 191configuration.Add(packageSources); 243context.PackageSources.Add(add); 411packageSourceMapping.Add(targetSourceElement); 426targetSourceElement.Add(packageElement); 474packageSourceMapping.Add(targetSourceElement); 489targetSourceElement.Add(packageElement); 535existingProperElement.Add(packageToMove); 607packageSourceElement.Add(wildcardPackage); 609packageSourceMapping.Add(packageSourceElement); 728context.Configuration.Add(packageSourceMapping); 746packageSource.Add(packageElement); 749packageSourceMapping.Add(packageSource); 792packageSourceElement.Add(wildcardPackage); 794packageSourceMapping.Add(packageSourceElement); 977configuration.Add(config); 993config.Add(globalPackagesFolderAdd);
Packaging\TemporaryNuGetConfig.cs (1)
139document.Add(configuration);
Projects\DotNetBasedAppHostServerProject.cs (13)
189projectRefGroup.Add(new XElement("ProjectReference", 200projectRefGroup.Add(new XElement("ProjectReference", 219projectRefGroup.Add(new XElement("ProjectReference", 226doc.Root!.Add(projectRefGroup); 231doc.Root!.Add(new XElement("ItemGroup", 243doc.Root!.Add(new XElement("Import", new XAttribute("Project", appHostInTargets))); 247doc.Root!.Add(new XElement("Import", new XAttribute("Project", sdkInTargets))); 254doc.Root!.Add(new XElement("ItemGroup", 259doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteHostProjectMetadataSources"))); 260doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteProjectMetadataSources"))); 370.Add(new XElement("RestoreRootConfigDirectory", _restoreRootConfigDirectory)); 378.Add(new XElement("RestoreAdditionalProjectSources", sourceList)); 382doc.Root!.Add(new XElement("ItemGroup",
Projects\PrebuiltAppHostServer.cs (6)
933propertyGroup.Add(new XElement("RestoreConfigFile", restoreConfigFile)); 941propertyGroup.Add(new XElement("RestoreAdditionalProjectSources", sourceList)); 952doc.Root!.Add(new XElement("ItemGroup", 967doc.Root!.Add(new XElement("ItemGroup", 972doc.Root!.Add( 982doc.Root!.Add(
Aspire.Cli.EndToEnd.Tests (1)
EntityFrameworkCoreDeploymentTests.cs (1)
262propertyGroup.Add(new XElement(propertyGroup.Name.Namespace + "RuntimeIdentifiers", targetRuntime));
Aspire.Hosting.Maui (12)
Utilities\MauiEnvironmentHelper.cs (12)
81projectElement.Add(new XElement( 92itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={encodedValue}"))); 94projectElement.Add(itemGroup); 105targetElement.Add(new XElement( 114targetElement.Add(new XElement( 120targetElement.Add(new XElement( 126targetElement.Add(new XElement( 131projectElement.Add(targetElement); 222projectElement.Add(new XElement( 237itemGroup.Add(new XElement("MlaunchEnvironmentVariables", 241projectElement.Add(itemGroup); 244projectElement.Add(new XElement(
dotnet-svcutil-lib (12)
Shared\MSBuildProj.cs (11)
85this.ProjectNode.Add(_projectReferenceGroup); 108this.ProjectNode.Add(_referenceGroup); 132this.ProjectNode.Add(_packageReferenceGroup); 451projectElement.Add(propertyGroup); 538this.ProjectReferceGroup.Add(new XElement("ProjectReference", new XAttribute("Include", dependency.FullPath))); 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", 609propertyGroup.Add(element);
Shared\Utilities\RuntimeEnvironmentHelper.cs (1)
103pkgSourcesNode.Add(addElement);
dotnet-user-jwts (3)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (3)
62propertyGroup.Add(" "); 63propertyGroup.Add(new XElement("UserSecretsId", newSecretsId)); 64propertyGroup.Add($"{Environment.NewLine} ");
dotnet-user-secrets (3)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (3)
62propertyGroup.Add(" "); 63propertyGroup.Add(new XElement("UserSecretsId", newSecretsId)); 64propertyGroup.Add($"{Environment.NewLine} ");
GenerateDocumentationAndConfigFiles (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
247symbolKindsElement.Add(symbolKind.CreateXElement()); 259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 271modifiersElement.Add(modifier.CreateXElement());
illink (2)
ILLink.Tasks (1)
CombineLinkerXmlFiles.cs (1)
37combined.Add(element);
Infrastructure.Tests (2)
Hex1bNativePublishingTests.cs (2)
260nativeItems.Add(new XElement(rid.Length == 0 ? "RuntimeTargetsCopyLocalItems" : "NativeCopyLocalItems", 282publishItems.Add(new XElement("ResolvedFileToPublish",
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlComments\XmlComment.InheritDoc.cs (1)
386temp.Add(node);
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (2)
170aspNetCoreSection.Add(environmentVariablesSection); 178environmentVariablesSection.Add(environmentVariable);
Microsoft.Build.Tasks.Core (4)
AssemblyDependency\GenerateBindingRedirects.cs (2)
85doc.Root.Add(runtimeNode); 109runtimeNode.Add(redirectNodes);
CombineTargetFrameworkInfoProperties.cs (1)
55root.Add(new XElement(item.ItemSpec, item.GetMetadata("Value")));
CombineXmlElements.cs (1)
41root.Add(XElement.Parse(item.ItemSpec));
Microsoft.CodeAnalysis (1)
InternalUtilities\XmlUtilities.cs (1)
29temp.Add(node);
Microsoft.CodeAnalysis.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
247symbolKindsElement.Add(symbolKind.CreateXElement()); 259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 271modifiersElement.Add(modifier.CreateXElement());
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
247symbolKindsElement.Add(symbolKind.CreateXElement()); 259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 271modifiersElement.Add(modifier.CreateXElement());
Microsoft.CodeAnalysis.CodeStyle (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
247symbolKindsElement.Add(symbolKind.CreateXElement()); 259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 271modifiersElement.Add(modifier.CreateXElement());
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
247symbolKindsElement.Add(symbolKind.CreateXElement()); 259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 271modifiersElement.Add(modifier.CreateXElement());
Microsoft.CodeAnalysis.Workspaces (29)
Log\WorkspaceStructureLogger.cs (25)
42document.Add(workspaceElement); 59projectElement.Add(msbuildReferencesElement); 65projectElement.Add(additionalElements); 69projectElement.Add(BuildWorkspaceReferencesElement(project)); 72projectElement.Add(workspaceAnalyzerReferencesElement); 76workspaceAnalyzerReferencesElement.Add(CreateElementForAnalyzerReference(analyzerReference)); 80projectElement.Add(new XElement("workspaceDocuments", await CreateElementsForDocumentCollectionAsync(project.Documents, "document", cancellationToken).ConfigureAwait(false))); 81projectElement.Add(new XElement("workspaceAdditionalDocuments", await CreateElementsForDocumentCollectionAsync(project.AdditionalDocuments, "additionalDocuments", cancellationToken).ConfigureAwait(false))); 82projectElement.Add(new XElement("workspaceAnalyzerConfigDocuments", await CreateElementsForDocumentCollectionAsync(project.AnalyzerConfigDocuments, "analyzerConfigDocument", cancellationToken).ConfigureAwait(false))); 86projectElement.Add(new XElement("workspaceSourceGeneratedDocuments", CreateElementsForSourceGeneratedDocuments(sourceGeneratedDocuments))); 90projectElement.Add(generatorDiagnosticsElement); 94generatorDiagnosticsElement.Add(CreateElementForDiagnostic(diagnostic)); 100workspaceElement.Add(projectElement); 139msbuildReferencesElement.Add(msbuildProject.Descendants(msbuildNamespace + "ProjectReference")); 140msbuildReferencesElement.Add(msbuildProject.Descendants(msbuildNamespace + "Reference")); 141msbuildReferencesElement.Add(msbuildProject.Descendants(msbuildNamespace + "ReferencePath")); 151workspaceReferencesElement.Add(CreateElementForPortableExecutableReference(metadataReference)); 160workspaceReferencesElement.Add(referenceElement); 173projectElement.Add(compilationReferencesElement); 176compilationReferencesElement.Add(CreateElementForPortableExecutableReference(reference)); 178projectElement.Add(CreateElementForCompilation(compilation)); 181projectElement.Add(diagnosticsElement); 185diagnosticsElement.Add(CreateElementForDiagnostic(diagnostic)); 283typesElement.Add(new XElement("type", new XAttribute("name", type.ToDisplayString()))); 310documentElement.Add(new XElement("loadDiagnostic", loadDiagnostic));
Shared\Extensions\ISymbolExtensions.cs (1)
575temp.Add(node);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
247symbolKindsElement.Add(symbolKind.CreateXElement()); 259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 271modifiersElement.Add(modifier.CreateXElement());
Microsoft.DotNet.Build.Tasks.Installers (7)
src\GenerateMacOSDistributionFile.cs (7)
110optionsElement.Add(new XAttribute("hostArchitectures", hostArchitecture)); 115document.Root.Add(optionsElement); 118document.Root.Add(titleElement); 119document.Root.Add(new XElement("choices-outline", choiceLineElements)); 120document.Root.Add(choiceElements); 121document.Root.Add(pkgRefElements); 122document.Root.Add(scriptElement);
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\FinalizeInsertionVsixFile.cs (1)
102installationElement.Add(systemComponent);
Microsoft.DotNet.Build.Tasks.Workloads (9)
Msi\WixDocument.cs (4)
96component.Add(registryKey); 105Package.Add(new XElement(s_wixNamespace + "Property", 114Package.Add(new XElement(s_wixNamespace + "PropertyRef", 122Package.Add(new XElement(s_wixNamespace + "CustomActionRef",
Msi\WixXmlExtensions.cs (5)
63element.Add(registryValue); 96element.Add(registryKey); 117element.Add(componentGroupRef); 139element.Add(directory); 151element.Add(directory);
Microsoft.DotNet.HotReload.Watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
1151solutionElement.Add(new XElement("Project", new XAttribute("Path", projectPath)));
Microsoft.DotNet.PackageTesting (8)
VerifyClosure.cs (8)
353doc.Root.Add(nodesElement); 354doc.Root.Add(linksElement); 364linksElement.Add(new XElement(s_dgmlns + "Link", 373linksElement.Add(new XElement(s_dgmlns + "Link", 382doc.Root.Add(categoriesElement); 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 (16)
parent\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (8)
353doc.Root.Add(nodesElement); 354doc.Root.Add(linksElement); 364linksElement.Add(new XElement(s_dgmlns + "Link", 373linksElement.Add(new XElement(s_dgmlns + "Link", 382doc.Root.Add(categoriesElement); 384categoriesElement.Add(new XElement(s_dgmlns + "Category", 389categoriesElement.Add(new XElement(s_dgmlns + "Category", 404parent.Add(new XElement(s_dgmlns + "Node",
src\CreateFrameworkListFile.cs (8)
174element.Add(new XAttribute("Language", analyzerLanguage)); 179element.Add( 186element.Add(new XAttribute("DropFromSingleFile", "true")); 220element.Add(new XAttribute("FileVersion", f.FileVersion)); 230element.Add(new XAttribute("Profile", profile)); 237element.Add(new XAttribute("ReferencedByDefault", referencedByDefault)); 255element.Add(new XAttribute("DropFromSingleFile", "true")); 259frameworkManifest.Add(element);
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WriteUsageReports.cs (1)
169report.Add(annotatedUsages.Select(u => u.ToXml()));
Microsoft.DotNet.XliffTasks (4)
Model\XElementExtensions.cs (2)
42targetElement.Add(new XAttribute("state", "new")); 77targetElement.Add(stateAttribute);
Model\XlfDocument.cs (2)
208bodyElement.Add(newTransUnit); 251bodyElement.Add(sortedTransUnits.Values);
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (2)
Manifest.cs (2)
51document.Add(root); 67directory.Add(entry.Children.Select(BuildNode));
Microsoft.Maui.Resizetizer (12)
GeneratePackageAppxManifest.cs (10)
85 appx.Root.Add(identity); 129 appx.Root.Add(properties); 175 appx.Root.Add(applications); 184 applications.Add(application); 193 application.Add(visual); 256 visual.Add(tile); 313 tile.Add(showname); 320 showname.Add(new XElement(xshowon, new XAttribute("Tile", "square150x150Logo"))); 322 showname.Add(new XElement(xshowon, new XAttribute("Tile", "wide310x150Logo"))); 332 visual.Add(splash);
GenerateTizenManifest.cs (2)
166 uiApplicationElement.Add(splashscreensElement); 184 splashscreensElement.Add(splashscreenElement);
Microsoft.NET.Build.Tasks (6)
GenerateToolsSettingsFile.cs (4)
81packageNode.Add(new XAttribute("RuntimeIdentifier", toolPackageRuntimeIdentifier)); 84packageNode.Add(new XAttribute("Id", ridPackageId)); 86runtimeIdentifierPackagesNode.Add(packageNode); 103dotnetCliToolNode.Add(runtimeIdentifierPackagesNode);
WriteAppConfigWithSupportedRuntime.cs (2)
78doc.Root.Add(startupNode); 81startupNode.Add(supportedRuntime);
Microsoft.NET.HostModel (5)
ComHost\RegFreeComManifest.cs (5)
31manifest.Add(new XElement(ns + "assemblyIdentity", 41manifest.Add(fileElement); 70comClassElement.Add(new XAttribute("progid", progIdValue.GetString())); 73fileElement.Add(comClassElement); 95fileElement.Add(typeLibElement);
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 (5)
Tasks\GenerateEnvTransform.cs (1)
82updatedContent.Descendants("environmentVariables").Single().Add(envVariableTransform);
WebConfigTransform.cs (4)
73handlersElement.Add(aspNetCoreElement); 126aspNetCoreElement.Add(attributes); 203envVariablesElement.Add(envVariableElement); 216parent?.Add(childElement);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (11)
GeneratePackageAssetsTargetsFile.cs (2)
39itemGroup.Add(manifestItem); 43document.Add(root);
GenerateStaticWebAssetEndpointsPropsFile.cs (2)
57itemGroup.Add(new XElement(nameof(StaticWebAssetEndpoint), 68document.Add(root);
GenerateStaticWebAssetsPropsFile.cs (2)
109itemGroup.Add(new XElement("StaticWebAsset", 134document.Add(root);
Legacy\GenerateStaticWebAssetsPropsFile50.cs (2)
62itemGroup.Add(new XElement("StaticWebAsset", 83document.Add(root);
Legacy\GenerateV1StaticWebAssetsManifest.cs (1)
43document.Add(root);
StaticWebAssetsGeneratePackagePropsFile.cs (2)
35root.Add(new XElement("Import", new XAttribute("Project", element))); 38document.Add(root);
NuGet.Commands (8)
RestoreCommand\Utility\BuildAssetsUtils.cs (8)
134doc.Root.Add(new XElement(Namespace + "Target", 283entry.Add(new XElement(Namespace + "CopyToOutputDirectory", "PreserveNewest")); 285entry.Add(new XElement(Namespace + "TargetPath", outputPath)); 291entry.Add(new XElement(Namespace + "DestinationSubDirectory", destinationSubDirectory + Path.DirectorySeparatorChar)); 296entry.Add(new XElement(Namespace + "Private", privateFlag.ToString(CultureInfo.CurrentCulture))); 306entry.Add(new XElement(Namespace + "Link", linkPath)); 337itemGroup.Add(new XAttribute("Condition", conditionValue)); 341doc.Root.Add(itemGroup);
NuGet.Configuration (10)
Settings\Items\AuthorItem.cs (1)
51element.Add(cert.AsXNode());
Settings\Items\CredentialsItem.cs (1)
229element.Add(_validAuthenticationTypes.AsXNode());
Settings\Items\OwnersItem.cs (1)
128((XElement)Node).Add(_content.Node);
Settings\Items\PackageSourceMappingSourceItem.cs (1)
136element.Add(packagePatternItem.AsXNode());
Settings\Items\RepositoryItem.cs (2)
115element.Add(cert.AsXNode()); 120element.Add(_owners.AsXNode());
Utility\XElementUtility.cs (4)
36container.Add(content); 104container.Add(new XText(containerIndent)); 115container.Add(new XText(containerIndent + oneIndentLevel)); 125container.Add(new XText(containerIndent));
NuGet.PackageManagement (7)
Utility\XElementExtensions.cs (7)
126source.Add(targetAttribute); 170source.Add(targetChild); 183AddContents(pendingComments, source.Add); 272container.Add(content); 278container.Add(new XText(containerIndent)); 287container.Add(new XText(containerIndent + oneIndentLevel)); 306container.Add(new XText(containerIndent));
NuGet.Packaging (29)
PackageCreation\Authoring\PackageBuilder.cs (2)
1198element.Add( 1207element.Add(
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (16)
40elem.Add(new XElement(ns + "id", metadata.Id)); 50elem.Add(new XElement(ns + "developmentDependency", metadata.DevelopmentDependency)); 56elem.Add(new XElement(ns + "requireLicenseAcceptance", metadata.RequireLicenseAcceptance)); 64elem.Add(licenseElement); 85elem.Add(new XElement(ns + "serviceable", metadata.Serviceable)); 90elem.Add(GetXElementFromManifestPackageTypes(ns, metadata.PackageTypes)); 98elem.Add(repoElement); 102elem.Add(GetXElementFromGroupableItemSets( 113elem.Add(GetXElementFromGroupableItemSets( 123elem.Add(GetXElementFromGroupableItemSets( 133elem.Add(GetXElementFromFrameworkAssemblies(ns, metadata.FrameworkReferences)); 134elem.Add(GetXElementFromManifestContentFiles(ns, metadata.ContentFiles)); 326packageTypesElement.Add(packageTypeElement); 360parent.Add(new XElement(ns + name, value)); 372parent.Add(new XElement(ns + name, processed)); 384parent.Add(new XElement(ns + name, processed));
PackagesConfigWriter.cs (11)
133packagesNode.Add(minClientVersionAttribute); 202packagesNode.Add(node); 281packagesNode!.Add(newPackageNode); 365node.Add(new XAttribute(XName.Get(PackagesConfig.IdAttributeName), entry.PackageIdentity.Id)); 366node.Add(new XAttribute(XName.Get(PackagesConfig.VersionAttributeName), entry.PackageIdentity.Version)); 376node.Add(new XAttribute(XName.Get(PackagesConfig.TargetFrameworkAttributeName), frameworkShortName)); 382node.Add(new XAttribute(XName.Get(PackagesConfig.allowedVersionsAttributeName), entry.AllowedVersions.ToString())); 387node.Add(new XAttribute(XName.Get(PackagesConfig.developmentDependencyAttributeName), "true")); 392node.Add(new XAttribute(XName.Get(PackagesConfig.RequireInstallAttributeName), "true")); 403document.Add(packagesNode); 487existingNode.Add(attribute);
Roslyn.Diagnostics.Analyzers (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (3)
247symbolKindsElement.Add(symbolKind.CreateXElement()); 259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 271modifiersElement.Add(modifier.CreateXElement());
System.Private.Xml.Linq (16)
System\Xml\Linq\XContainer.cs (5)
170foreach (object? obj in o) Add(obj); 176foreach (object? obj in e) Add(obj); 194Add((object)content); 210/// See <see cref="XContainer.Add(object)"/> for details about the content that can be added 441Add(content);
System\Xml\Linq\XDocument.cs (2)
59/// See <see cref="XContainer.Add(object)"/> for details about the content that can be added 87/// See <see cref="XContainer.Add(object)"/> for details about the content that can be added
System\Xml\Linq\XElement.cs (3)
318Add(value); 975Add(content); 1012Add(content);
System\Xml\Linq\XNodeBuilder.cs (5)
47_root.Add(_content); 96_parent.Add(a); 142e.Add(string.Empty); 218_parent.Add(n); 243_parent.Add(s);
System\Xml\Schema\XNodeValidator.cs (1)
290e.Add(a);