338 references to XElement
aspire (25)
Commands\AddCommand.cs (4)
513var configuration = new XElement( 515new XElement( 528new XElement( 537new XElement(
DotNet\DotNetAppHostRestorePreview.cs (1)
91new XElement("RestoreRootConfigDirectory", MSBuildEscaping.Escape(configuration.EffectiveWorkingDirectory.FullName))));
Projects\CSharpProjectFile.cs (11)
193var root = new XElement("Project", new XAttribute("Sdk", Sdk)); 197root.Add(new XElement("PropertyGroup", 198Properties.Select(property => new XElement(property.Name, property.Value)))); 203root.Add(new XElement("ItemGroup", 209root.Add(new XElement("ItemGroup", 215root.Add(new XElement("ItemGroup", 219root.Add(Imports.Select(import => new XElement("Import", new XAttribute("Project", import.ProjectPath)))); 230var element = new XElement("PackageReference", new XAttribute("Include", packageReference.Name)); 245var element = new XElement("ProjectReference", new XAttribute("Include", projectReference.ProjectPath)); 256var element = new XElement("None", new XAttribute("Update", noneItem.Update)); 273element.Add(new XElement(name, value.Value ? "true" : "false"));
Projects\DotNetBasedAppHostServerProject.cs (2)
215projectFile.Targets.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteHostProjectMetadataSources"))); 216projectFile.Targets.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteProjectMetadataSources")));
Projects\IntegrationClosureBuilder.cs (7)
151new XElement("BaseOutputPath", CliPathHelper.EnsureTrailingSlash(Path.Combine(restoreDir, "bin"))), 152new XElement("BaseIntermediateOutputPath", CliPathHelper.EnsureTrailingSlash(intermediateOutputPath)), 153new XElement("MSBuildProjectExtensionsPath", "$(BaseIntermediateOutputPath)"), 154new XElement("RestoreRootConfigDirectory", restoreRootConfigDirectory), 155new XElement("RestoreConfigFile", string.Empty)); 159propertyGroup.Add(new XElement("RestorePackagesPath", globalPackagesFolder)); 162return new XDocument(new XElement("Project", propertyGroup));
aspire-tray (6)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (6)
31new XElement("key", "Label"), new XElement("string", Label), 32new XElement("key", "ProgramArguments"), 33new XElement("array", new[] { cliPath, "tray", "start", "--non-interactive", "--nologo" } 34.Select(argument => new XElement("string", argument))), 35new XElement("key", "RunAtLoad"), new XElement("true"))));
Aspire.Cli.EndToEnd.Tests (2)
EntityFrameworkCoreDeploymentTests.cs (1)
267propertyGroup.Add(new XElement(propertyGroup.Name.Namespace + "RuntimeIdentifiers", targetRuntime));
Helpers\KubernetesDeployTestHelpers.cs (1)
381references.Add(new System.Xml.Linq.XElement("ProjectReference",
Aspire.Cli.Tests (4)
Packaging\PackageSourceIdentityTests.cs (1)
77new XElement("configuration",
Projects\PrebuiltAppHostServerTests.cs (1)
645new XElement("package", new XAttribute("pattern", "*"))))))
Secrets\SecretStoreResolverTests.cs (2)
527document.Root!.Add(new XElement("PropertyGroup", new XElement("UserSecretsId", userSecretsId)));
Aspire.Hosting.Azure.Provisioning.Generators (3)
AspireProvisioningProxyGenerator.cs (3)
1145new XElement("returns", $"The result of {method.Name}."), 2076new XElement("summary", summary), 2159new XElement(
Aspire.Hosting.Dotnet (3)
DotnetProjectBuildResource.cs (3)
237new XElement( 240new XElement( 247new XElement("RestoreGraphProjectInput", "@(ProjectFile->'%(FullPath)')"),
Aspire.Hosting.Maui (7)
Utilities\MauiEnvironmentHelper.cs (7)
90itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={encodedValue}"))); 112targetElement.Add(new XElement( 114new XElement("AndroidEnvironment", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 118targetElement.Add(new XElement( 120new XElement("FileWrites", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 124targetElement.Add(new XElement( 235itemGroup.Add(new XElement("MlaunchEnvironmentVariables",
Aspire.Templates.Tests (2)
BuildAndRunTemplateTests.cs (2)
160document.Root.AddFirst(new XElement("PropertyGroup", 161new XElement("SuppressAspireAppHostSdkObsoleteWarning", "true")));
Aspire.Tray.Tests (7)
Helpers\TrayPanelSvgRenderer.cs (1)
86var group = new XElement(s_svg + "g", new XAttribute("clip-path", $"url(#{id})"));
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (6)
31new XElement("key", "Label"), new XElement("string", Label), 32new XElement("key", "ProgramArguments"), 33new XElement("array", new[] { cliPath, "tray", "start", "--non-interactive", "--nologo" } 34.Select(argument => new XElement("string", argument))), 35new XElement("key", "RunAtLoad"), new XElement("true"))));
dotnet-svcutil-lib (2)
Shared\MSBuildProj.cs (2)
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)));
dotnet-user-jwts (1)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
63propertyGroup.Add(new XElement("UserSecretsId", newSecretsId));
dotnet-user-secrets (1)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
63propertyGroup.Add(new XElement("UserSecretsId", newSecretsId));
GenerateDocumentationAndConfigFiles (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
345new XElement("SymbolSpecifications", SymbolSpecifications.Select(s => s.CreateXElement())), 346new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 347new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (5)
259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 370SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 372SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 533=> new(nameof(ModifierKind), ModifierKindWrapper);
GenerateTemplateManifest (13)
Program.cs (2)
163cachePatterns.Select(pattern => new XElement("package", new XAttribute("pattern", pattern))))); 173builtIds.Order(StringComparer.OrdinalIgnoreCase).Select(id => new XElement("package", new XAttribute("pattern", id)))));
TemplateRestorePlan.cs (11)
149new XElement("TargetFramework", parameters["Framework"]), 150new XElement("OutputType", "Exe"), 151new XElement("FileBasedProgram", "true"))); 168project.Add(new XElement("ItemGroup", new XElement("PackageReference", new XAttribute("Include", name), new XAttribute("Version", value)))); 171project.Element("PropertyGroup")!.Add(new XElement(name, value)); 294project.Frameworks.Count > 0 ? new XElement("TargetFrameworks", string.Join(";", project.Frameworks)) : null, 295new XElement("EnableDefaultItems", "false"), 296new XElement("ManagePackageVersionsCentrally", "false"), 297new XElement("NuGetAudit", "false"))); 303new XDocument(new XElement("Solution", Projects.Select(project => 304new XElement("Project", new XAttribute("Path", $"{project.Name}/{project.Name}.csproj"))))).Save(solutionPath);
illink (3)
Infrastructure.Tests (49)
Hex1bNativePublishingTests.cs (19)
367new XElement("NuGetPackageId", "Hex1b"), 368new XElement("PathInPackage", pathInPackage), 369new XElement("DestinationSubPath", rid.Length == 0 ? pathInPackage : Path.GetFileName(pathInPackage)), 370new XElement("DestinationSubDirectory", rid.Length == 0 ? pathInPackage[..(pathInPackage.LastIndexOf('/') + 1)] : ""))); 377new XElement("NuGetPackageId", "OtherPackage"), 378new XElement("PathInPackage", "native/OpenConsole.exe"), 379new XElement("RelativePath", "other/OpenConsole.exe")); 383new XElement("RelativePath", "%(DestinationSubDirectory)%(Filename)%(Extension)")), 389new XElement("RelativePath", "other/OpenConsole.exe"))); 397new XElement("ImportDirectoryBuildProps", "false"), 398new XElement("ImportDirectoryBuildTargets", "false")), 401new XElement("TargetFramework", "net11.0"), 402new XElement("RuntimeIdentifier", rid), 403new XElement("PublishSingleFile", singleFile), 404new XElement("IncludeNativeLibrariesForSelfExtract", "true")), 406new XElement("Import", new XAttribute("Project", Path.Combine(RepoRoot.Path, "src", "Aspire.Hosting", "buildTransitive", "Aspire.Hosting.targets"))), 410new XElement("ItemGroup", new XElement("_ResolvedCopyLocalPublishAssets", 412new XElement("DestinationSubPath", "%(Filename)%(Extension)"), 413new XElement("DestinationSubDirectory", "")))),
ResourceGeneratorMetadataTests.cs (10)
67new XElement("PropertyGroup", configuration.Root!.Elements("PropertyGroup").Elements("ResxCodeGenerator").Select(property => new XElement(property))), 68new XElement("PropertyGroup", source.Root!.Elements("PropertyGroup").Elements("ResxCodeGenerator").Select(property => new XElement(property))), 70neutralResources.Concat(otherResources).Select(path => new XElement("EmbeddedResource", new XAttribute("Include", path))), 71designers.Concat(otherSources).Select(path => new XElement("Compile", new XAttribute("Include", path)))), 72new XElement("ItemGroup", source.Root.Elements("ItemGroup").Elements() 77settingsDesigner.Add(new XElement("DependentUpon", "Settings.settings")); 78settingsDesigner.Add(new XElement("DesignTime", "True")); 79settingsDesigner.Add(new XElement("AutoGen", "True")); 82linkedResource.Add(new XElement("Link", Path.Combine(resourceDirectory, "Linked.resx"))); 83linkedResource.Add(new XElement("LogicalName", "Shared.Linked.resources"));
Shared\TestTrxBuilder.cs (7)
29new XElement( 32new XElement( 35new XElement( 119string.IsNullOrEmpty(testCase.StdOut) ? null : new XElement(s_namespace + "StdOut", testCase.StdOut), 120string.IsNullOrEmpty(testCase.StdErr) ? null : new XElement(s_namespace + "StdErr", testCase.StdErr))); 132string.IsNullOrEmpty(testCase.ErrorMessage) ? null : new XElement(s_namespace + "Message", testCase.ErrorMessage), 133string.IsNullOrEmpty(testCase.StackTrace) ? null : new XElement(s_namespace + "StackTrace", testCase.StackTrace));
TemplateManifest\TemplateManifestBuildTargetTests.cs (5)
36new XElement("RepoRoot", root + Path.DirectorySeparatorChar), 37new XElement("IntermediateOutputPath", Path.Combine(intermediate, "unused", "..")), 38new XElement("ArtifactsShippingPackagesDir", Path.Combine(root, "artifacts", "packages") + Path.DirectorySeparatorChar)), 39new XElement("Target", new XAttribute("Name", "RefreshTemplatePackageInputsForCgManifest")), 40new XElement("Target", new XAttribute("Name", "ReplacePackageVersionOnTemplates")),
TemplateManifest\TemplateManifestTestEnvironment.cs (8)
57new XElement("package", new XAttribute("pattern", "*")))), 58new XElement("fallbackPackageFolders", new XElement("clear")))).Save(ConfigPath); 122new XDocument(new XElement("package", 124new XElement("id", name), 125new XElement("version", version), 126new XElement("authors", "Test"), 127new XElement("description", "Hermetic template manifest fixture"), 129new XElement("dependencies", dependencies.Select(dependency =>
Microsoft.AspNetCore.DataProtection (18)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptor.cs (2)
43var encryptionElement = new XElement("encryption", 48: (object)new XElement("validation",
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptor.cs (1)
54var hashElement = new XElement("hash",
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptor.cs (1)
49var validationElement = new XElement("validation",
AuthenticatedEncryption\ConfigurationModel\SecretExtensions.cs (1)
40new XElement("value", unprotectedSecretAsBase64String));
KeyManagement\XmlKeyManager.cs (9)
389new XElement(RevocationDateElementName, revocationDate), 391new XElement(KeyElementName, 393new XElement(ReasonElementName, reason)); 527new XElement(CreationDateElementName, creationDate), 528new XElement(ActivationDateElementName, activationDate), 529new XElement(ExpirationDateElementName, expirationDate), 634new XElement(RevocationDateElementName, revocationDate), 635new XElement(KeyElementName, 637new XElement(ReasonElementName, reason));
XmlEncryption\CertificateXmlEncryptor.cs (1)
89xmlDocument.Load(new XElement("root", plaintextElement).CreateReader());
XmlEncryption\DpapiNGXmlEncryptor.cs (1)
88new XElement("value",
XmlEncryption\DpapiXmlEncryptor.cs (1)
84new XElement("value",
XmlEncryption\EncryptedXmlDecryptor.cs (1)
69xmlDocument.Load(new XElement("root", encryptedElement).CreateReader());
Microsoft.Build.Tasks.Core (5)
AssemblyDependency\GenerateBindingRedirects.cs (1)
95select new XElement(
AssemblyDependency\ResolveAssemblyReference.cs (2)
1409var node = new XElement( 1413new XElement(
CombineTargetFrameworkInfoProperties.cs (2)
50new("TargetFramework", new XAttribute("Name", EscapingUtilities.Escape(RootElementName))) : 55root.Add(new XElement(item.ItemSpec, item.GetMetadata("Value")));
Microsoft.CodeAnalysis.Analyzers (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
345new XElement("SymbolSpecifications", SymbolSpecifications.Select(s => s.CreateXElement())), 346new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 347new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (5)
259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 370SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 372SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 533=> new(nameof(ModifierKind), ModifierKindWrapper);
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
345new XElement("SymbolSpecifications", SymbolSpecifications.Select(s => s.CreateXElement())), 346new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 347new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (5)
259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 370SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 372SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 533=> new(nameof(ModifierKind), ModifierKindWrapper);
Microsoft.CodeAnalysis.CodeStyle (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
345new XElement("SymbolSpecifications", SymbolSpecifications.Select(s => s.CreateXElement())), 346new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 347new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (5)
259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 370SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 372SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 533=> new(nameof(ModifierKind), ModifierKindWrapper);
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
AbstractResxGenerator.cs (1)
798var escapedTrimmedValue = new XElement("summary", value).ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
345new XElement("SymbolSpecifications", SymbolSpecifications.Select(s => s.CreateXElement())), 346new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 347new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (5)
259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 370SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 372SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 533=> new(nameof(ModifierKind), ModifierKindWrapper);
Microsoft.CodeAnalysis.Workspaces (17)
Log\WorkspaceStructureLogger.cs (9)
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))); 155var referenceElement = new XElement("projectReference", new XAttribute("id", SanitizePath(projectReference.ProjectId.ToString()))); 259return new XElement("metadataReference", new XAttribute("display", SanitizePath(reference.Display))); 283typesElement.Add(new XElement("type", new XAttribute("name", type.ToDisplayString()))); 301var documentElement = new XElement(elementName, new XAttribute("path", SanitizePath(document.FilePath))); 310documentElement.Add(new XElement("loadDiagnostic", loadDiagnostic));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
345new XElement("SymbolSpecifications", SymbolSpecifications.Select(s => s.CreateXElement())), 346new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 347new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (5)
259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 370SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 372SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 533=> new(nameof(ModifierKind), ModifierKindWrapper);
Microsoft.DotNet.Arcade.Sdk (1)
src\GenerateResxSource.cs (1)
431string escapedTrimmedValue = new XElement("summary", value).ToString();
Microsoft.DotNet.Build.Manifest (1)
BuildIdentity.cs (1)
259public XElement ToXmlBuildElement() => new XElement("Build", ToXmlAttributes());
Microsoft.DotNet.Build.Tasks.Installers (5)
src\GenerateMacOSDistributionFile.cs (5)
44var titleElement = new XElement("title", $"{ProductBrandName} ({TargetArchitecture})"); 65var scriptElement = new XElement("script", new XCData(archScriptContent)); 73new XElement("pkg-ref", new XAttribute("id", component.GetMetadata("FileNameWithExtension"))))); 90.Select(c => new XElement("line", new XAttribute("choice", c.Attribute("id").Value))); 119document.Root.Add(new XElement("choices-outline", choiceLineElements));
Microsoft.DotNet.Build.Tasks.Workloads (4)
Msi\WixDocument.cs (2)
114Package.Add(new XElement(s_wixNamespace + "PropertyRef", 122Package.Add(new XElement(s_wixNamespace + "CustomActionRef",
Msi\WixXmlExtensions.cs (2)
87var registryKey = new XElement(s_wixNamespace + "RegistryKey", 115var componentGroupRef = new XElement(s_wixNamespace + "ComponentGroupRef",
Microsoft.DotNet.HotReload.Watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
1151solutionElement.Add(new XElement("Project", new XAttribute("Path", projectPath)));
Microsoft.DotNet.SourceBuild.Tasks (6)
src\UsageReport\UsageData.cs (6)
20CreatedByRid == null ? null : new XElement( 23ProjectDirectories?.Any() != true ? null : new XElement( 26.Select(dir => new XElement("Dir", dir))), 27NeverRestoredTarballPrebuilts?.Any() != true ? null : new XElement( 32IgnorePatterns?.Any() != true ? null : new XElement( 36Usages?.Any() != true ? null : new XElement(
Microsoft.DotNet.XliffTasks (3)
Model\XElementExtensions.cs (1)
35targetElement = new XElement(Target, new XAttribute("state", "new"));
Model\XlfDocument.cs (2)
191new XElement(Source, sourceNode.Source), 193new XElement(Note, sourceNode.Note == "" ? null : sourceNode.Note));
Microsoft.Extensions.AI.Evaluation.Safety (3)
ContentSafetyServicePayloadUtilities.cs (3)
112item.Add(new XElement(questionElementName, question.Text)); 117item.Add(new XElement(answerElementName, answer.Text)); 122item.Add(new XElement(contextElementName, normalizedPerTurnContext[index]));
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (4)
Manifest.cs (4)
47new XElement(ElementNames.ManifestVersion, "1.0"), 48new XElement(ElementNames.FileSystem, 62new XElement(ElementNames.ResourcePath, entry.AssemblyResourceName)); 66var directory = new XElement(ElementNames.Directory, new XAttribute(ElementNames.Name, entry.Name));
Microsoft.Maui.Resizetizer (2)
GeneratePackageAppxManifest.cs (2)
320 showname.Add(new XElement(xshowon, new XAttribute("Tile", "square150x150Logo"))); 322 showname.Add(new XElement(xshowon, new XAttribute("Tile", "wide310x150Logo")));
Microsoft.ML.Maml (1)
HelpCommand.cs (1)
509return new XElement("DefaultValue", a.DefaultValue);
Microsoft.NET.Build.Tasks (3)
GenerateToolsSettingsFile.cs (2)
68XElement commandNode = new XElement("Command", 99new XElement("Commands", commandNode));
WriteAppConfigWithSupportedRuntime.cs (1)
128new XElement(
Microsoft.NET.HostModel (2)
ComHost\RegFreeComManifest.cs (2)
30XElement manifest = new XElement(ns + "assembly", new XAttribute("manifestVersion", "1.0")); 56XElement fileElement = new XElement(ns + "file", new XAttribute("name", comHostName));
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
CreateBlazorTrimmerRootDescriptorFile.cs (1)
63new XElement("type", attributes)));
Microsoft.NET.Sdk.StaticWebAssets.Tasks (44)
GeneratePackageAssetsTargetsFile.cs (4)
35new XElement("SourceId", PackageId), 36new XElement("ContentRoot", $@"$(MSBuildThisFileDirectory)..\{normalizedPrefix}\"), 37new XElement("PackageRoot", @"$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..'))")); 42var root = new XElement("Project", itemGroup);
GenerateStaticWebAssetEndpointsPropsFile.cs (5)
59new XElement(nameof(StaticWebAssetEndpoint.AssetFile), fullPathExpression), 60new XElement(nameof(StaticWebAssetEndpoint.Selectors), new XCData(StaticWebAssetEndpointSelector.ToMetadataValue(element.Selectors))), 61new XElement(nameof(StaticWebAssetEndpoint.EndpointProperties), new XCData(StaticWebAssetEndpointProperty.ToMetadataValue(element.EndpointProperties))), 62new XElement(nameof(StaticWebAssetEndpoint.ResponseHeaders), new XCData(StaticWebAssetEndpointResponseHeader.ToMetadataValue(element.ResponseHeaders))))); 66var root = new XElement("Project", itemGroup);
GenerateStaticWebAssetsPropsFile.cs (19)
111new XElement(SourceType, emittedSourceType), 112new XElement(SourceId, element.GetMetadata(SourceId)), 113new XElement(ContentRoot, @$"$(MSBuildThisFileDirectory)..\{Normalize(PackagePathPrefix)}\"), 114new XElement(BasePath, element.GetMetadata(BasePath)), 115new XElement(RelativePath, relativePath), 116new XElement(AssetKind, element.GetMetadata(AssetKind)), 117new XElement(AssetMode, element.GetMetadata(AssetMode)), 118new XElement(AssetRole, element.GetMetadata(AssetRole)), 119new XElement(RelatedAsset, element.GetMetadata(RelatedAsset)), 120new XElement(AssetTraitName, element.GetMetadata(AssetTraitName)), 121new XElement(AssetTraitValue, element.GetMetadata(AssetTraitValue)), 122new XElement(Fingerprint, element.GetMetadata(Fingerprint)), 123new XElement(Integrity, element.GetMetadata(Integrity)), 124new XElement(CopyToOutputDirectory, element.GetMetadata(CopyToOutputDirectory)), 125new XElement(CopyToPublishDirectory, element.GetMetadata(CopyToPublishDirectory)), 126new XElement(FileLength, element.GetMetadata(FileLength)), 127new XElement(LastWriteTime, element.GetMetadata(LastWriteTime)), 128new XElement(OriginalItemSpec, fullPathExpression))); 132var root = new XElement("Project", itemGroup);
Legacy\GenerateStaticWebAssetsPropsFile50.cs (15)
64new XElement(SourceType, "Package"), 65new XElement(SourceId, element.GetMetadata(SourceId)), 66new XElement(ContentRoot, @$"$(MSBuildThisFileDirectory)..\{Normalize(PackagePathPrefix)}\"), 67new XElement(BasePath, element.GetMetadata(BasePath)), 68new XElement(RelativePath, element.GetMetadata(RelativePath)), 69new XElement(AssetKind, element.GetMetadata(AssetKind)), 70new XElement(AssetMode, element.GetMetadata(AssetMode)), 71new XElement(AssetRole, element.GetMetadata(AssetRole)), 72new XElement(RelatedAsset, element.GetMetadata(RelatedAsset)), 73new XElement(AssetTraitName, element.GetMetadata(AssetTraitName)), 74new XElement(AssetTraitValue, element.GetMetadata(AssetTraitValue)), 75new XElement(CopyToOutputDirectory, element.GetMetadata(CopyToOutputDirectory)), 76new XElement(CopyToPublishDirectory, element.GetMetadata(CopyToPublishDirectory)), 77new XElement(OriginalItemSpec, fullPathExpression))); 81var root = new XElement("Project", itemGroup);
StaticWebAssetsGeneratePackagePropsFile.cs (1)
35root.Add(new XElement("Import", new XAttribute("Project", element)));
NuGet.Commands (12)
RestoreCommand\Utility\BuildAssetsUtils.cs (12)
138new XElement(Namespace + "Warning", 251return new XElement(Namespace + itemName, new XAttribute("Include", path)); 266new XElement(Namespace + "NuGetPackageId", packageId), 267new XElement(Namespace + "NuGetPackageVersion", packageVersion), 268new XElement(Namespace + "NuGetItemType", item.BuildAction), 269new XElement(Namespace + "Pack", false)); 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)); 331var itemGroup = new XElement(Namespace + group.RootName, group.Items);
NuGet.Configuration (3)
Settings\Items\OwnersItem.cs (1)
76var element = new XElement(ElementName, _content.AsXNode());
Settings\Items\UnknownItem.cs (1)
155var element = new XElement(ElementName, Children.Select(c => c.AsXNode()));
Settings\SettingsGroup.cs (1)
62var element = new XElement(XmlUtility.GetEncodedXMLName(ElementName), Children.Select(c => c.AsXNode()));
NuGet.Packaging (22)
PackageCreation\Authoring\Manifest.cs (1)
104new XElement(schemaNamespace + "files",
PackageCreation\Authoring\PackageBuilder.cs (6)
1240new XElement(dc + "creator", string.Join(", ", Authors)), 1241new XElement(dc + "description", Description), 1242new XElement(dc + "identifier", Id), 1243new XElement(core + "version", Version!.ToString()), 1245new XElement(core + "keywords", ((IPackageMetadata)this).Tags), 1247new XElement(core + "lastModifiedBy", CreatorInfo())
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (15)
40elem.Add(new XElement(ns + "id", metadata.Id)); 50elem.Add(new XElement(ns + "developmentDependency", metadata.DevelopmentDependency)); 56elem.Add(new XElement(ns + "requireLicenseAcceptance", metadata.RequireLicenseAcceptance)); 85elem.Add(new XElement(ns + "serviceable", metadata.Serviceable)); 202return new XElement(ns + NuspecUtility.FrameworkReference, new XAttribute(NuspecUtility.Name, frameworkReference.Name)); 207return new XElement(ns + Reference, new XAttribute(File, reference)); 231return new XElement(ns + "dependency", attributes); 241return new XElement( 258return new XElement(ns + "contentFiles", 273return new XElement(ns + Files, attributes.Where(xAtt => xAtt != null)); 314return new XElement(ns + NuspecUtility.Repository, attributeList); 342return new XElement(ns + NuspecUtility.PackageType, attributes.Where(xAtt => xAtt != null)); 360parent.Add(new XElement(ns + name, value)); 372parent.Add(new XElement(ns + name, processed)); 384parent.Add(new XElement(ns + name, processed));
Roslyn.Diagnostics.Analyzers (8)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
345new XElement("SymbolSpecifications", SymbolSpecifications.Select(s => s.CreateXElement())), 346new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 347new XElement("NamingRules", SerializableNamingRules.Select(n => n.CreateXElement())));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (5)
259accessibilitiesElement.Add(new XElement("AccessibilityKind", accessibility)); 370SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 371SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 372SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 533=> new(nameof(ModifierKind), ModifierKindWrapper);
Stress.ApiService (1)
Program.cs (1)
398var xmlWithUrl = new XElement(new XElement("url", "http://localhost:8080")).ToString();
System.Private.Xml.Linq (2)
System\Xml\Linq\XElement.cs (2)
95public XElement(XName name, params object?[] content) : this(name, (object)content) { } 1270AddNode(new XElement(name, GetStringValue(value)));