652 instantiations of XAttribute
aspire (52)
DotNet\DotNetAppHostRestorePreview.cs (16)
77new XAttribute("Name", "_AspireCandidateRestoreSettings"),
78new XAttribute("BeforeTargets", "_GetRestoreSettings"));
92new XAttribute("Project", MSBuildEscaping.Escape(Path.GetFullPath(restoreTargets, Path.GetDirectoryName(path)!))),
93new XAttribute("Condition", condition)));
96new XAttribute("Project", MSBuildEscaping.Escape(restoreSettings.RestoreTargets)),
97new XAttribute("Condition", customProjects.Count == 0 ? "true" : string.Join(" And ", customProjects))));
115new XAttribute("Condition",
155new XAttribute("Name", "_AspireIsolatedRestoreOutputs"),
156new XAttribute("BeforeTargets", "_GenerateRestoreProjectSpec"),
163new XAttribute("Condition", "'$(NuGetLockFilePath)' != ''"),
168new XAttribute("Condition", "'$(_AspireProjectLockFile)' == '' And Exists('$(_AspireNamedLockFile)')"),
171new XAttribute("Condition", "'$(_AspireProjectLockFile)' == ''"),
175new XElement("MakeDir", new XAttribute("Directories", outputRoot)),
177new XAttribute("SourceFiles", "$(_AspireProjectLockFile)"),
178new XAttribute("DestinationFiles", "$(NuGetLockFilePath)"),
179new XAttribute("Condition", "Exists('$(_AspireProjectLockFile)')")));
Projects\CSharpProjectFile.cs (7)
193var root = new XElement("Project", new XAttribute("Sdk", Sdk));
219root.Add(Imports.Select(import => new XElement("Import", new XAttribute("Project", import.ProjectPath))));
230var element = new XElement("PackageReference", new XAttribute("Include", packageReference.Name));
234element.Add(new XAttribute(packageReference.VersionAttributeName, packageReference.Version));
245var element = new XElement("ProjectReference", new XAttribute("Include", projectReference.ProjectPath));
256var element = new XElement("None", new XAttribute("Update", noneItem.Update));
260element.Add(new XAttribute("CopyToOutputDirectory", noneItem.CopyToOutputDirectory));
Projects\IntegrationClosureBuilder.cs (23)
81new XAttribute("Name", "_WriteAspireProjectRefAssemblyNames"),
82new XAttribute("AfterTargets", "Build"),
83new XAttribute("Condition", "'$(AspireProjectRefAssemblyNamesFile)' != ''"),
85new XAttribute("File", "$(AspireProjectRefAssemblyNamesFile)"),
86new XAttribute("Lines", "@(_ResolvedProjectReferencePaths->'%(Filename)')"),
87new XAttribute("Overwrite", "true"),
88new XAttribute("WriteOnlyWhenDifferent", "true"))));
92new XAttribute("Name", "_WriteAspireClosureManifest"),
93new XAttribute("AfterTargets", "Build"),
94new XAttribute("Condition", "'$(AspireClosureSourcesFile)' != ''"),
95new XAttribute("DependsOnTargets", "ResolveLockFileCopyLocalFiles"),
97new XAttribute("File", "$(AspireClosureSourcesFile)"),
98new XAttribute("Lines", "@(ReferenceCopyLocalPaths->'%(FullPath)')"),
99new XAttribute("Overwrite", "true"),
100new XAttribute("WriteOnlyWhenDifferent", "true")),
102new XAttribute("File", "$(AspireClosureMetadataFile)"),
103new XAttribute("Lines", "@(ReferenceCopyLocalPaths->'%(NuGetPackageId)|%(NuGetPackageVersion)|%(PathInPackage)|%(AssetType)')"),
104new XAttribute("Overwrite", "true"),
105new XAttribute("WriteOnlyWhenDifferent", "true")),
107new XAttribute("File", "$(AspireClosureTargetsFile)"),
108new XAttribute("Lines", "@(ReferenceCopyLocalPaths->'%(DestinationSubDirectory)%(Filename)%(Extension)')"),
109new XAttribute("Overwrite", "true"),
110new XAttribute("WriteOnlyWhenDifferent", "true"))));
aspire-tray (1)
Aspire.Cli.EndToEnd.Tests (13)
IntegrationSourceTests.cs (8)
28sources.Add(new XElement("add", new XAttribute("key", "aspire-apphost-test"),
29new XAttribute("value", "https://example.test/cli/v3/index.json")));
33sources.Add(new XElement("add", new XAttribute("key", "nuget.org"),
34new XAttribute("value", "https://api.nuget.org/v3/index.json")));
194sources.Add(new XElement("add", new XAttribute("key", "nuget.org"),
195new XAttribute("value", "https://api.nuget.org/v3/index.json")));
201new XElement("packageSource", new XAttribute("key", source.Attribute("key")!.Value),
202new XElement("package", new XAttribute("pattern", "*"))))));
UpdateChannelNuGetConfigOrderingTests.cs (4)
127new XElement("add", new XAttribute("key", "dependency"),
128new XAttribute("value", CliE2ETestHelpers.ToContainerPath(feed.FullName, workspace))),
129new XElement("add", new XAttribute("key", "nuget.org"),
130new XAttribute("value", "https://api.nuget.org/v3/index.json")))))
Aspire.Cli.Tests (36)
NuGet\NuGetClientTests.cs (12)
44new XElement("add", new XAttribute("key", "fixture"), new XAttribute("value", feed.FullName))),
47new XElement("add", new XAttribute("key", "fixture"), new XAttribute("value", fallback.FullName)))))
441new XElement("add", new XAttribute("key", "selected"), new XAttribute("value", selectedSource)),
442new XElement("add", new XAttribute("key", selectedSource), new XAttribute("value", otherSource))
452new XElement("packageSource", new XAttribute("key", "selected"),
453new XElement("package", new XAttribute("pattern", packageId))),
454new XElement("packageSource", new XAttribute("key", selectedSource),
455new XElement("package", new XAttribute("pattern", "*")))));
Projects\PrebuiltAppHostServerTests.cs (17)
362new XElement("add", new XAttribute("key", "channel"), new XAttribute("value", channelFeed.FullName)),
363new XElement("add", new XAttribute("key", "team"), new XAttribute("value", teamFeed.FullName)));
366new XElement("packageSource", new XAttribute("key", "channel"),
367new XElement("package", new XAttribute("pattern", "Aspire*"))),
368new XElement("packageSource", new XAttribute("key", "team"),
369new XElement("package", new XAttribute("pattern", privatePackage)),
370new XElement("package", new XAttribute("pattern", selectedPackage))));
373packageSources.Add(new XElement("add", new XAttribute("key", "other"), new XAttribute("value", overrideFeed.FullName)));
374packageMappings.Add(new XElement("packageSource", new XAttribute("key", "other"),
375new XElement("package", new XAttribute("pattern", otherPackage))));
758new XAttribute("key", "ambient"),
759new XAttribute("value", ambientServiceIndex))),
763new XAttribute("key", "ambient"),
764new XElement("package", new XAttribute("pattern", "*"))))))
Aspire.Hosting.Azure.ApiManagement (2)
Aspire.Hosting.Azure.Provisioning.Generators (5)
Aspire.Hosting.Dotnet (17)
DotnetProjectBuildResource.cs (17)
236new XAttribute("DefaultTargets", "Build"),
242new XAttribute(
250new XAttribute("Condition", "'$(NuGetRestoreTargets)' == ''"),
255new XAttribute("Project", "$(NuGetRestoreTargets)"),
256new XAttribute(
292new XAttribute("Importance", "high"),
293new XAttribute("Text", "Restoring projects individually as configured by the AppHost.")));
301new XAttribute("Importance", "high"),
302new XAttribute("Text", "Restoring projects individually because RestoreUseStaticGraphEvaluation is enabled."),
303new XAttribute("Condition", "'$(RestoreUseStaticGraphEvaluation)' == 'true'")),
306new XAttribute("Importance", "high"),
307new XAttribute("Text", "Restoring projects individually because the selected NuGet restore targets are unavailable."),
308new XAttribute(
320new XAttribute("Name", name),
323new XAttribute("Projects", "@(ProjectFile)"),
324new XAttribute("Targets", name),
325new XAttribute("BuildInParallel", buildInParallel)));
Aspire.Hosting.Maui (21)
Utilities\MauiEnvironmentHelper.cs (21)
81new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"),
82new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')")
90itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={encodedValue}")));
97new XAttribute("Name", "AspireGenerateAndroidEnvironmentFiles"),
98new XAttribute("BeforeTargets", "_GenerateEnvironmentFiles"),
99new XAttribute("Condition", "'@(_GeneratedAndroidEnvironment)' != ''")
105new XAttribute("File", "$(IntermediateOutputPath)__aspire_environment__.txt"),
106new XAttribute("Lines", "@(_GeneratedAndroidEnvironment)"),
107new XAttribute("Overwrite", "True"),
108new XAttribute("WriteOnlyWhenDifferent", "True")
114new XElement("AndroidEnvironment", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt"))
120new XElement("FileWrites", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt"))
126new XAttribute("Files", "$(_AndroidStampDirectory)_GeneratePackageManagerJava.stamp")
222new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"),
223new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')")
236new XAttribute("Include", $"{key}={encodedValue}")));
244new XAttribute("Name", "AspireLogMlaunchEnvironmentVariables"),
245new XAttribute("AfterTargets", "PrepareForBuild"),
246new XAttribute("Condition", "'@(MlaunchEnvironmentVariables)' != ''"),
249new XAttribute("Importance", "High"),
250new XAttribute("Text", "Aspire forwarding mlaunch environment variables: @(MlaunchEnvironmentVariables, ', ')")
Aspire.Templates.Tests (4)
Aspire.Tray.Tests (68)
Helpers\TrayPanelSvgRenderer.cs (67)
28new XAttribute("width", F(width)),
29new XAttribute("height", F(height)),
30new XAttribute("viewBox", $"{F(-margin)} {F(-margin)} {F(width)} {F(height)}"),
31new XAttribute(XNamespace.Xmlns + "xlink", s_xlink.NamespaceName),
32new XAttribute("font-family", FontFamily));
37defs.Add(new XElement(s_svg + "filter", new XAttribute("id", "shadow"),
38new XAttribute("x", "-20%"), new XAttribute("y", "-20%"), new XAttribute("width", "140%"), new XAttribute("height", "140%"),
39new XElement(s_svg + "feDropShadow", new XAttribute("dx", "0"), new XAttribute("dy", "6"),
40new XAttribute("stdDeviation", "9"), new XAttribute("flood-opacity", "0.22"))));
41root.Add(new XElement(s_svg + "rect", new XAttribute("width", F(scene.Width)), new XAttribute("height", F(scene.Height)),
42new XAttribute("rx", F(TrayPanel.CornerRadius)), new XAttribute("fill", "#000"), new XAttribute("filter", "url(#shadow)")));
53current.Add(new XElement(s_svg + "path", new XAttribute("d", ToPathData(fill.Path)), Paint("fill", fill.Color)));
56current.Add(new XElement(s_svg + "path", new XAttribute("d", ToPathData(stroke.Path)), new XAttribute("fill", "none"),
57Paint("stroke", stroke.Color), new XAttribute("stroke-width", F(stroke.Width)),
58new XAttribute("stroke-linecap", "round"), new XAttribute("stroke-linejoin", "round")));
69FillPathCommand fill => new XElement(s_svg + "path", new XAttribute("d", ToPathData(fill.Path)), Paint("fill", fill.Color)),
70StrokePathCommand stroke => new XElement(s_svg + "path", new XAttribute("d", ToPathData(stroke.Path)), new XAttribute("fill", "none"),
71Paint("stroke", stroke.Color), new XAttribute("stroke-width", F(stroke.Width)),
72new XAttribute("stroke-linecap", "round"), new XAttribute("stroke-linejoin", "round")),
79? new XElement(s_svg + "rect", Bounds(logo.Bounds), new XAttribute("rx", "6"), new XAttribute("fill", "#512BD4"))
81new XAttribute("href", "data:image/png;base64," + Convert.ToBase64String(logoPng))));
85defs.Add(new XElement(s_svg + "clipPath", new XAttribute("id", id), new XElement(s_svg + "rect", Bounds(clip.Bounds))));
86var group = new XElement(s_svg + "g", new XAttribute("clip-path", $"url(#{id})"));
114var layer = new XElement(s_svg + "g", new XAttribute("font-family", "Menlo, Consolas, monospace"), new XAttribute("font-size", "4"));
118var line = new XElement(s_svg + "line", new XAttribute("x1", F(x1)), new XAttribute("y1", F(y1)), new XAttribute("x2", F(x2)),
119new XAttribute("y2", F(y2)), new XAttribute("stroke", color), new XAttribute("stroke-width", "0.5"));
122line.Add(new XAttribute("stroke-dasharray", dash));
133layer.Add(new XElement(s_svg + "text", new XAttribute("x", F(guide.Position)), new XAttribute("y", "-2"),
134new XAttribute("fill", "#00A8C0"), new XAttribute("text-anchor", "middle"), F(guide.Position)));
143layer.Add(new XElement(s_svg + "rect", Bounds(b), new XAttribute("fill", "none"), new XAttribute("stroke", "#E6B800"),
144new XAttribute("stroke-width", "0.5")));
182new XAttribute("x", F(x)),
183new XAttribute("font-size", F(size)),
184new XAttribute("font-weight", PanelFonts.IsSemibold(text.Font) ? "600" : "400"),
185new XAttribute("text-anchor", anchor),
189element.Add(new XAttribute("letter-spacing", "0.4"));
195element.Add(new XAttribute("y", F(text.Baseline)), lines[0]);
200element.Add(new XElement(s_svg + "tspan", new XAttribute("x", F(x)),
201new XAttribute("y", F(text.Bounds.Y + size + i * lineHeight - 1)), lines[i]));
252? [new XAttribute(name, color.ToHex())]
253: [new XAttribute(name, (color with { A = 255 }).ToHex()), new XAttribute(name + "-opacity", F(color.Alpha))];
256=> [new XAttribute("x", F(rect.X)), new XAttribute("y", F(rect.Y)), new XAttribute("width", F(rect.Width)), new XAttribute("height", F(rect.Height))];
dotnet-svcutil-lib (14)
Shared\MSBuildProj.cs (12)
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)));
562new XAttribute("CopyToOutputDirectory", "always"),
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
564new XAttribute("Link", $"{framework}/%(RecursiveDir)%(Filename)%(Extension)")));
572new XAttribute("CopyToOutputDirectory", "always"),
573new XAttribute("Include", $"{basePath}\\{framework}\\**"),
574new XAttribute("Link", $"{framework}/%(RecursiveDir)%(Filename)%(Extension)")));
GenerateDocumentationAndConfigFiles (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
467new XAttribute(nameof(ID), ID),
468new XAttribute(nameof(Name), Name),
469new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
470new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
471new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
472new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
GenerateTemplateManifest (12)
Program.cs (8)
157sources.Add(new XElement("add", new XAttribute("key", cacheSource), new XAttribute("value", sharedCache)));
162mappings.Add(new XElement("packageSource", new XAttribute("key", cacheSource),
163cachePatterns.Select(pattern => new XElement("package", new XAttribute("pattern", pattern)))));
169new XAttribute("key", localSourceName),
170new XAttribute("value", localPackageFeed)));
172new XAttribute("key", localSourceName),
173builtIds.Order(StringComparer.OrdinalIgnoreCase).Select(id => new XElement("package", new XAttribute("pattern", id)))));
TemplateRestorePlan.cs (4)
151var project = new XElement("Project", new XAttribute("Sdk", "Microsoft.NET.Sdk"),
172project.Add(new XElement("ItemGroup", new XElement("PackageReference", new XAttribute("Include", name), new XAttribute("Version", value))));
308new XElement("Project", new XAttribute("Path", $"{project.Name}/{project.Name}.csproj"))))).Save(solutionPath);
illink (4)
Linker\WarningSuppressionWriter.cs (4)
67var xmlAssembly = new XElement("assembly", new XAttribute("fullname", assemblyName.FullName));
74new XAttribute("fullname", "System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"),
77new XElement("property", new XAttribute("name", UnconditionalSuppressMessageAttributeState.ScopeProperty),
79new XElement("property", new XAttribute("name", UnconditionalSuppressMessageAttributeState.TargetProperty),
Infrastructure.Tests (51)
Hex1bNativePublishingTests.cs (21)
392new XAttribute("Include", source),
402new XAttribute("Include", unrelatedSource),
408new XAttribute("Include", "@(_ResolvedCopyLocalPublishAssets);@(RuntimeTargetsCopyLocalItems)"),
414new XAttribute("Include", Path.Combine(_workspace.Path, "duplicate", "OpenConsole.exe")),
425new XElement("Import", new XAttribute("Project", "Sdk.props"), new XAttribute("Sdk", "Microsoft.NET.Sdk")),
431new XElement("Import", new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")),
432new XElement("Import", new XAttribute("Project", Path.Combine(RepoRoot.Path, "src", "Aspire.Hosting", "buildTransitive", "Aspire.Hosting.targets"))),
433new XElement("Target", new XAttribute("Name", "ResolvePackageAssets"), nativeItems),
434new XElement("Target", new XAttribute("Name", "_ResolveCopyLocalAssetsForPublish"),
435new XAttribute("DependsOnTargets", "ResolvePackageAssets"),
437new XAttribute("Include", "@(NativeCopyLocalItems)"),
440new XElement("Target", new XAttribute("Name", "ComputeResolvedFilesToPublishList"),
441new XAttribute("DependsOnTargets", "_ResolveCopyLocalAssetsForPublish"), publishItems),
442new XElement("Target", new XAttribute("Name", "ComputeFilesToPublish"),
443new XAttribute("DependsOnTargets", "ComputeResolvedFilesToPublishList")),
444new XElement("Target", new XAttribute("Name", "CopyTestFiles"),
445new XAttribute("DependsOnTargets", "ComputeFilesToPublish"),
446new XElement("Copy", new XAttribute("SourceFiles", "@(ResolvedFileToPublish)"),
447new XAttribute("DestinationFiles", "@(ResolvedFileToPublish->'$(MSBuildProjectDirectory)/publish/%(RelativePath)')")))));
Shared\TestTrxBuilder.cs (20)
39new XAttribute("total", testCases.Length),
40new XAttribute("executed", testCases.Length),
41new XAttribute("passed", testCases.Count(test => test.Outcome == "Passed")),
42new XAttribute("failed", testCases.Count(test => test.Outcome == "Failed")),
43new XAttribute("error", testCases.Count(test => test.Outcome == "Error")),
44new XAttribute("timeout", testCases.Count(test => test.Outcome == "Timeout")),
45new XAttribute("aborted", 0),
46new XAttribute("inconclusive", 0),
47new XAttribute("passedButRunAborted", 0),
48new XAttribute("notRunnable", 0),
49new XAttribute("notExecuted", 0)))));
96new XAttribute("name", testCase.DisplayName),
97new XAttribute("id", $"test-{index}"),
100new XAttribute("className", testCase.CanonicalTestName[..lastDotIndex]),
101new XAttribute("name", testCase.TestMethodName ?? testCase.CanonicalTestName[(lastDotIndex + 1)..])));
108new XAttribute("testId", $"test-{index}"),
109new XAttribute("testName", testCase.DisplayName),
110new XAttribute("outcome", testCase.Outcome),
114testCase.StartTime is null ? null : new XAttribute("startTime", testCase.StartTime),
115testCase.EndTime is null ? null : new XAttribute("endTime", testCase.EndTime),
TemplateManifest\TemplateManifestTestEnvironment.cs (6)
53new XElement("add", new XAttribute("key", "external"), new XAttribute("value", ExternalFeed))),
56new XElement("packageSource", new XAttribute("key", "external"),
57new XElement("package", new XAttribute("pattern", "*")))),
130new XElement("dependency", new XAttribute("id", dependency.Name),
131new XAttribute("version", dependency.Version))))))).Save(stream);
Microsoft.AspNetCore.DataProtection (17)
KeyManagement\XmlKeyManager.cs (6)
388new XAttribute(VersionAttributeName, 1),
392new XAttribute(IdAttributeName, RevokeAllKeysValue)),
525new XAttribute(IdAttributeName, keyId),
526new XAttribute(VersionAttributeName, 1),
633new XAttribute(VersionAttributeName, 1),
636new XAttribute(IdAttributeName, keyId)),
Microsoft.Build.Tasks.Core (15)
AssemblyDependency\GenerateBindingRedirects.cs (9)
101new XAttribute("name", redirect.Key.Name),
102new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(redirect.Key.GetPublicKeyToken())),
103new XAttribute("culture", String.IsNullOrEmpty(redirect.Key.CultureName) ? "neutral" : redirect.Key.CultureName)),
106new XAttribute("oldVersion", "0.0.0.0-" + redirect.Value),
107new XAttribute("newVersion", redirect.Value))));
301new XAttribute("name", newName),
302new XAttribute(
305new XAttribute(
311attributes.Add(new XAttribute("processorArchitecture", newProcessorArchitecture.ToString()));
Microsoft.CodeAnalysis.Analyzers (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
467new XAttribute(nameof(ID), ID),
468new XAttribute(nameof(Name), Name),
469new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
470new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
471new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
472new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.AnalyzerUtilities (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
467new XAttribute(nameof(ID), ID),
468new XAttribute(nameof(Name), Name),
469new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
470new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
471new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
472new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.CodeStyle (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
467new XAttribute(nameof(ID), ID),
468new XAttribute(nameof(Name), Name),
469new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
470new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
471new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
472new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.ResxSourceGenerator (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
467new XAttribute(nameof(ID), ID),
468new XAttribute(nameof(Name), Name),
469new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
470new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
471new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
472new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.Workspaces (36)
Log\WorkspaceStructureLogger.cs (20)
155var referenceElement = new XElement("projectReference", new XAttribute("id", SanitizePath(projectReference.ProjectId.ToString())));
191new XAttribute("id", diagnostic.Id),
192new XAttribute("severity", diagnostic.Severity.ToString()),
193new XAttribute("path", SanitizePath(diagnostic.Location.GetLineSpan().Path)),
204new XAttribute("hintName", document.HintName),
205new XAttribute("path", SanitizePath(document.FilePath)),
206new XAttribute("generatorType", identity.Generator.TypeName),
207new XAttribute("generatorAssembly", identity.Generator.AssemblyName),
208new XAttribute("generatorAssemblyVersion", identity.Generator.AssemblyVersion.ToString()),
209new XAttribute("generatorAssemblyPath", SanitizePath(identity.Generator.AssemblyPath)));
242var aliasesAttribute = new XAttribute("aliases", string.Join(",", reference.Properties.Aliases));
253new XAttribute("file", SanitizePath(portableExecutableReference.FilePath)),
254new XAttribute("display", SanitizePath(portableExecutableReference.Display)),
259return new XElement("metadataReference", new XAttribute("display", SanitizePath(reference.Display)));
265new XAttribute("path", SanitizePath(reference.FullPath)),
266new XAttribute("display", SanitizePath(reference.Display)));
283typesElement.Add(new XElement("type", new XAttribute("name", type.ToDisplayString())));
290new XAttribute("objectId", compilationId.Value),
291new XAttribute("assemblyIdentity", compilation.Assembly.Identity.ToString()),
301var documentElement = new XElement(elementName, new XAttribute("path", SanitizePath(document.FilePath)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
467new XAttribute(nameof(ID), ID),
468new XAttribute(nameof(Name), Name),
469new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
470new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
471new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
472new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.DotNet.Build.Manifest (1)
Microsoft.DotNet.Build.Tasks.Installers (8)
src\GenerateMacOSDistributionFile.cs (8)
69new XAttribute("id", component.GetMetadata("FileNameWithExtension")),
70new XAttribute("visible", "true"),
71new XAttribute("title", component.GetMetadata("Title")),
72new XAttribute("description", component.GetMetadata("Description")),
73new XElement("pkg-ref", new XAttribute("id", component.GetMetadata("FileNameWithExtension")))));
90.Select(c => new XElement("line", new XAttribute("choice", c.Attribute("id").Value)));
94new XAttribute("id", component.GetMetadata("FileNameWithExtension")),
110optionsElement.Add(new XAttribute("hostArchitectures", hostArchitecture));
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Build.Tasks.Workloads (15)
Msi\WixDocument.cs (8)
106new XAttribute("Id", id),
107new XAttribute("Value", value)));
115new XAttribute("Id", id)));
123new XAttribute("Id", id)));
141new XAttribute("Id", id),
142new XAttribute("Name", name));
152new XAttribute("Root", root),
153new XAttribute("Key", key));
Msi\WixXmlExtensions.cs (7)
54new XAttribute("Value", value),
55new XAttribute("Type", type),
56new XAttribute("KeyPath", keyPath ? "yes" : "no"));
88new XAttribute("Key", key));
116new XAttribute("Id", id));
136new XAttribute("Id", id),
137new XAttribute("Name", name));
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.PackageTesting (10)
VerifyClosure.cs (10)
365new XAttribute("Source", assembly.Name),
366new XAttribute("Target", reference.Name)));
374new XAttribute("Source", assembly.Name),
375new XAttribute("Target", moduleReference)));
385new XAttribute("Id", "native"),
386new XAttribute("Background", "Blue")
390new XAttribute("Id", "managed"),
391new XAttribute("Background", "Green")
405new XAttribute("Id", id),
406new XAttribute("Category", isNative ? "native": "managed")));
Microsoft.DotNet.SharedFramework.Sdk (23)
parent\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (10)
365new XAttribute("Source", assembly.Name),
366new XAttribute("Target", reference.Name)));
374new XAttribute("Source", assembly.Name),
375new XAttribute("Target", moduleReference)));
385new XAttribute("Id", "native"),
386new XAttribute("Background", "Blue")
390new XAttribute("Id", "managed"),
391new XAttribute("Background", "Green")
405new XAttribute("Id", id),
406new XAttribute("Category", isNative ? "native": "managed")));
src\CreateFrameworkListFile.cs (13)
68?.Select(item => new XAttribute(item.ItemSpec, item.GetMetadata("Value")))
169new XAttribute("Type", type),
170new XAttribute("Path", path));
174element.Add(new XAttribute("Language", analyzerLanguage));
180new XAttribute("Culture", Path.GetFileName(Path.GetDirectoryName(path))));
186element.Add(new XAttribute("DropFromSingleFile", "true"));
210new XAttribute("AssemblyName", f.AssemblyName.Name),
211new XAttribute("PublicKeyToken", publicKeyTokenHex),
212new XAttribute("AssemblyVersion", f.AssemblyName.Version));
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"));
Microsoft.DotNet.SourceBuild.Tasks (4)
Microsoft.DotNet.XliffTasks (13)
Model\XlfDocument.cs (10)
51new XAttribute("xmlns", XliffNS.NamespaceName),
52new XAttribute(XNamespace.Xmlns + "xsi", XsiNS.NamespaceName),
53new XAttribute("version", "1.2"),
54new XAttribute(XsiNS + "schemaLocation", $"{XliffNS.NamespaceName} xliff-core-1.2-transitional.xsd"),
56new XAttribute("datatype", "xml"),
57new XAttribute("source-language", "en"),
58new XAttribute("target-language", targetLanguage),
59new XAttribute("original", "_"), // placeholder will be replaced on first update
190new XAttribute("id", sourceNode.Id),
192new XElement(Target, new XAttribute("state", "new"), sourceNode.Source),
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (2)
Microsoft.Maui.Resizetizer (2)
Microsoft.NET.Build.Tasks (9)
Microsoft.NET.HostModel (12)
ComHost\RegFreeComManifest.cs (12)
30XElement manifest = new XElement(ns + "assembly", new XAttribute("manifestVersion", "1.0"));
32new XAttribute("type", "win32"),
33new XAttribute("name", $"{assemblyName}.X"),
34new XAttribute("version", assemblyVersion)));
56XElement fileElement = new XElement(ns + "file", new XAttribute("name", comHostName));
67XElement comClassElement = new XElement(ns + "comClass", new XAttribute("clsid", guid.ToString("B")), new XAttribute("threadingModel", "Both"));
70comClassElement.Add(new XAttribute("progid", progIdValue.GetString()));
91new XAttribute("tlbid", name.ToString("B")),
92new XAttribute("resourceid", typeLibrary.Key),
93new XAttribute("version", version),
94new XAttribute("helpdir", ""));
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (7)
Microsoft.NET.Sdk.Publish.Tasks (5)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (8)
NuGet.Commands (14)
RestoreCommand\Utility\BuildAssetsUtils.cs (14)
135new XAttribute("Name", "EmitMSBuildWarning"),
136new XAttribute("BeforeTargets", "Build"),
139new XAttribute("Text", Strings.MSBuildWarning_MultiTarget))));
214new XAttribute("Condition", $" {ExcludeAllCondition} "),
223new XAttribute("Condition", $" {ExcludeAllCondition} "),
236new XAttribute("ToolsVersion", "14.0"),
237new XAttribute("xmlns", Namespace.NamespaceName)));
245new XAttribute("Condition", $" '$({propertyName})' == '' "),
251return new XElement(Namespace + itemName, new XAttribute("Include", path));
257new XAttribute("Project", path),
258new XAttribute("Condition", $"Exists('{path}')"));
264new XAttribute("Include", path),
265new XAttribute("Condition", $"Exists('{path}')"),
337itemGroup.Add(new XAttribute("Condition", conditionValue));
NuGet.Packaging (41)
PackageCreation\Authoring\PackageBuilder.cs (17)
1175new XAttribute("Type", "http://schemas.microsoft.com/packaging/2010/07/manifest"),
1176new XAttribute("Target", $"/{path}"),
1177new XAttribute("Id", GenerateRelationshipId($"/{path}"))),
1179new XAttribute("Type", "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"),
1180new XAttribute("Target", $"/{psmdcpPath}"),
1181new XAttribute("Id", GenerateRelationshipId($"/{psmdcpPath}")))
1200new XAttribute("Extension", "rels"),
1201new XAttribute("ContentType", "application/vnd.openxmlformats-package.relationships+xml")),
1203new XAttribute("Extension", "psmdcp"),
1204new XAttribute("ContentType", "application/vnd.openxmlformats-package.core-properties+xml"))
1210new XAttribute("Extension", extension),
1211new XAttribute("ContentType", "application/octet")
1219new XAttribute("PartName", file),
1220new XAttribute("ContentType", "application/octet")
1247new XAttribute(XNamespace.Xmlns + "dc", dcText),
1248new XAttribute(XNamespace.Xmlns + "dcterms", dctermsText),
1249new XAttribute(XNamespace.Xmlns + "xsi", xsiText),
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (13)
202return new XElement(ns + NuspecUtility.FrameworkReference, new XAttribute(NuspecUtility.Name, frameworkReference.Name));
207return new XElement(ns + Reference, new XAttribute(File, reference));
214attributes.Add(new XAttribute("id", dependency.Id));
218attributes.Add(new XAttribute("version", dependency.VersionRange.ToLegacyShortString()));
223attributes.Add(new XAttribute("include", string.Join(",", dependency.Include)));
228attributes.Add(new XAttribute("exclude", string.Join(",", dependency.Exclude)));
245new XAttribute(AssemblyName, reference.AssemblyName),
247new XAttribute("targetFramework", string.Join(", ", reference.SupportedFrameworks.Where(f => f.IsSpecificFramework).Select(f => f.GetFrameworkString()))) :
294attributeList.Add(new XAttribute(NuspecUtility.Type, repository.Type));
299attributeList.Add(new XAttribute(NuspecUtility.RepositoryUrl, repository.Url));
304attributeList.Add(new XAttribute(NuspecUtility.RepositoryBranch, repository!.Branch!));
309attributeList.Add(new XAttribute(NuspecUtility.RepositoryCommit, repository!.Commit!));
352return new XAttribute(name, value);
Roslyn.Diagnostics.Analyzers (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
467new XAttribute(nameof(ID), ID),
468new XAttribute(nameof(Name), Name),
469new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
470new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
471new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
472new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
System.Private.Xml.Linq (12)
475 references to XAttribute
Aspire.Hosting.Azure.Provisioning.Generators (2)
dotnet-svcutil-lib (3)
GenerateDocumentationAndConfigFiles (4)
ilc (7)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.OpenApi.SourceGenerators (3)
Microsoft.AspNetCore.Rewrite (2)
Microsoft.Build.Tasks.Core (13)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.Analyzers (4)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp (8)
Microsoft.CodeAnalysis.Features (5)
Microsoft.CodeAnalysis.NetAnalyzers (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.VisualBasic (8)
Microsoft.CodeAnalysis.Workspaces (7)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Manifest (2)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.Build.Tasks.VisualStudio (2)
Microsoft.DotNet.NuGetRepack.Tasks (4)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.SourceBuild.Tasks (2)
Microsoft.DotNet.XliffTasks (9)
Microsoft.Maui.Resizetizer (13)
Microsoft.NET.Build.Tasks (2)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
Microsoft.NET.Sdk.Publish.Tasks (2)
Microsoft.TestPlatform.Build (1)
netstandard (1)
NuGet.Configuration (7)
NuGet.PackageManagement (10)
NuGet.Packaging (29)
NuGet.Protocol (1)
Roslyn.Diagnostics.Analyzers (4)
sdk-tasks (1)
System.ComponentModel.TypeConverter (13)
System.Private.Xml.Linq (282)
System.Xml.Linq (1)
System.Xml.XDocument (1)