270 references to Add
aspire (35)
Packaging\NuGetConfigMerger.cs (18)
165doc.Add(configuration); 172configuration.Add(packageSources); 224context.PackageSources.Add(add); 350packageSourceMapping.Add(targetSourceElement); 365targetSourceElement.Add(packageElement); 413packageSourceMapping.Add(targetSourceElement); 428targetSourceElement.Add(packageElement); 473existingProperElement.Add(packageToMove); 571packageSourceElement.Add(wildcardPackage); 573packageSourceMapping.Add(packageSourceElement); 607packageSourceElement.Add(wildcardPackage); 727context.Configuration.Add(packageSourceMapping); 745packageSource.Add(packageElement); 748packageSourceMapping.Add(packageSource); 791packageSourceElement.Add(wildcardPackage); 793packageSourceMapping.Add(packageSourceElement); 970configuration.Add(config); 983config.Add(globalPackagesFolderAdd);
Projects\DotNetBasedAppHostServerProject.cs (13)
187projectRefGroup.Add(new XElement("ProjectReference", 197projectRefGroup.Add(new XElement("ProjectReference", 216projectRefGroup.Add(new XElement("ProjectReference", 223doc.Root!.Add(projectRefGroup); 228doc.Root!.Add(new XElement("ItemGroup", 240doc.Root!.Add(new XElement("Import", new XAttribute("Project", appHostInTargets))); 244doc.Root!.Add(new XElement("Import", new XAttribute("Project", sdkInTargets))); 251doc.Root!.Add(new XElement("ItemGroup", 258doc.Root!.Add(new XElement("ItemGroup", 263doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteHostProjectMetadataSources"))); 264doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteProjectMetadataSources"))); 379.Add(new XElement("RestoreAdditionalProjectSources", sourceList)); 383doc.Root!.Add(new XElement("ItemGroup",
Projects\PrebuiltAppHostServer.cs (4)
288propertyGroup.Add(new XElement("RestoreAdditionalProjectSources", sourceList)); 299doc.Root!.Add(new XElement("ItemGroup", 314doc.Root!.Add(new XElement("ItemGroup", 321doc.Root!.Add(
Aspire.Hosting.Maui (12)
Utilities\MauiEnvironmentHelper.cs (12)
95projectElement.Add(new XElement( 105itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={value}"))); 107projectElement.Add(itemGroup); 118targetElement.Add(new XElement( 127targetElement.Add(new XElement( 133targetElement.Add(new XElement( 139targetElement.Add(new XElement( 144projectElement.Add(targetElement); 266projectElement.Add(new XElement( 282itemGroup.Add(new XElement("MlaunchEnvironmentVariables", 286projectElement.Add(itemGroup); 289projectElement.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);
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlComments\XmlComment.InheritDoc.cs (1)
386temp.Add(node);
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)
107optionsElement.Add(new XAttribute("hostArchitectures", hostArchitecture)); 112document.Root.Add(optionsElement); 115document.Root.Add(titleElement); 116document.Root.Add(new XElement("choices-outline", choiceLineElements)); 117document.Root.Add(choiceElements); 118document.Root.Add(pkgRefElements); 119document.Root.Add(scriptElement);
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\FinalizeInsertionVsixFile.cs (1)
104installationElement.Add(systemComponent);
Microsoft.DotNet.HotReload.Watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
1131solutionElement.Add(new XElement("Project", new XAttribute("Path", projectPath)));
Microsoft.DotNet.PackageTesting (8)
VerifyClosure.cs (8)
349doc.Root.Add(nodesElement); 350doc.Root.Add(linksElement); 360linksElement.Add(new XElement(s_dgmlns + "Link", 369linksElement.Add(new XElement(s_dgmlns + "Link", 378doc.Root.Add(categoriesElement); 380categoriesElement.Add(new XElement(s_dgmlns + "Category", 385categoriesElement.Add(new XElement(s_dgmlns + "Category", 400parent.Add(new XElement(s_dgmlns + "Node",
Microsoft.DotNet.SharedFramework.Sdk (16)
src\arcade\src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (8)
349doc.Root.Add(nodesElement); 350doc.Root.Add(linksElement); 360linksElement.Add(new XElement(s_dgmlns + "Link", 369linksElement.Add(new XElement(s_dgmlns + "Link", 378doc.Root.Add(categoriesElement); 380categoriesElement.Add(new XElement(s_dgmlns + "Category", 385categoriesElement.Add(new XElement(s_dgmlns + "Category", 400parent.Add(new XElement(s_dgmlns + "Node",
src\CreateFrameworkListFile.cs (8)
165element.Add(new XAttribute("Language", analyzerLanguage)); 170element.Add( 177element.Add(new XAttribute("DropFromSingleFile", "true")); 211element.Add(new XAttribute("FileVersion", f.FileVersion)); 221element.Add(new XAttribute("Profile", profile)); 228element.Add(new XAttribute("ReferencedByDefault", referencedByDefault)); 246element.Add(new XAttribute("DropFromSingleFile", "true")); 250frameworkManifest.Add(element);
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WriteUsageReports.cs (1)
157report.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)
207bodyElement.Add(newTransUnit); 250bodyElement.Add(sortedTransUnits.Values);
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)
73doc.Root.Add(startupNode); 76startupNode.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)
54itemGroup.Add(new XElement(nameof(StaticWebAssetEndpoint), 65document.Add(root);
GenerateStaticWebAssetsPropsFile.cs (2)
105itemGroup.Add(new XElement("StaticWebAsset", 130document.Add(root);
Legacy\GenerateStaticWebAssetsPropsFile50.cs (2)
62itemGroup.Add(new XElement("StaticWebAsset", 83document.Add(root);
Legacy\GenerateV1StaticWebAssetsManifest.cs (1)
43document.Add(root);
StaticWebAssetsGeneratePackagePropsFile.cs (2)
30root.Add(new XElement("Import", new XAttribute("Project", element))); 33document.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)
1227element.Add( 1236element.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);