62 instantiations of XDocument
aspire (4)
aspire-tray (1)
Aspire.Cli.EndToEnd.Tests (3)
Aspire.Cli.Tests (3)
Aspire.Hosting.Dotnet (1)
Aspire.Hosting.Maui (2)
Aspire.Tray.Tests (1)
GenerateTemplateManifest (2)
illink (1)
ILLink.Tasks (1)
Infrastructure.Tests (8)
Microsoft.AspNetCore.DataProtection (3)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.PackageTesting (1)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.XliffTasks (1)
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (1)
Microsoft.NET.Build.Tasks (2)
Microsoft.NET.HostModel (1)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (2)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
NuGet.Commands (1)
NuGet.Configuration (1)
NuGet.PackageManagement (2)
NuGet.Packaging (5)
System.Private.Xml.Linq (2)
950 references to XDocument
AnalyzeCiFailure (4)
aspire (29)
aspire-tray (4)
Aspire.Cli.EndToEnd.Tests (39)
Aspire.Cli.Tests (253)
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (53)
112configurations.Add(new XElement("selection", new XAttribute("feed", name), XDocument.Load(config.FullName).Root));
332Assert.Empty(XDocument.Load(candidate.TargetFile.FullName).Descendants("packageSource"));
414Assert.Single(XDocument.Load(target.FullName).Root!.Element("packageSources")!.Elements("add"));
415Assert.Single(XDocument.Load(target.FullName).Root!.Element("packageSourceMapping")!.Elements("clear"));
452var originalDisabled = XDocument.Load(target.FullName).Root!.Element("disabledPackageSources")!.ToString();
477XDocument.Parse(candidate.GetProposedDocument().OuterXml).Root!.Element("disabledPackageSources")!.ToString());
562await Verify(XDocument.Load(targetConfigPath).ToString(), "xml");
583var xml = XDocument.Load(targetConfigPath);
623var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
662var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
702var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
742var xml = XDocument.Load(target);
779var document = XDocument.Load(target.FullName);
900var document = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
943await Verify(XDocument.Load(Path.Combine(output.FullName, "nuget.config")).ToString(), "xml");
1013var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
1054var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
1106var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
1172var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
1229var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
1312var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
1362var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
1578Assert.Equal(XDocument.Parse(original).ToString(), XDocument.Parse(update.GetOriginalDocument()!.OuterXml).ToString());
1579await Verify(XDocument.Parse(update.GetProposedDocument().OuterXml).ToString(), "xml");
1596Assert.Equal(XDocument.Parse(update.GetProposedDocument().OuterXml).ToString(), XDocument.Load(update.TargetFile.FullName).ToString());
1720var document = XDocument.Load(target.FullName);
1781var originalDisabled = XDocument.Load(target.FullName).Root!.Element("disabledPackageSources")!.ToString();
1794var document = XDocument.Load(stream);
1996var originalDisabled = XDocument.Load(target.FullName).Root!.Element("disabledPackageSources")?.ToString();
2005var proposed = XDocument.Load(target.FullName);
2069await Verify(XDocument.Load(target.FullName).ToString(), "xml")
2105await Verify(XDocument.Load(target.FullName).ToString(), "xml");
2246XDocument.Parse(confirmedDocument.OuterXml).ToString(),
2247XDocument.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")).ToString());
Projects\PrebuiltAppHostServerTests.cs (80)
316var overlay = XDocument.Load(overlayFile.FullName);
455var doc = XDocument.Parse(xml);
484var doc = XDocument.Parse(xml);
508var doc = XDocument.Parse(xml);
521var doc = XDocument.Parse(xml);
534var doc = XDocument.Parse(xml);
545var doc = IntegrationClosureBuilder.CreateClosureDirectoryBuildProps(
803var restoreConfig = XDocument.Load(Path.Combine(
849var projectNuGetConfig = XDocument.Load(projectNuGetConfigPath);
892var doc = XDocument.Parse(xml);
909var doc = XDocument.Parse(xml);
926var doc = XDocument.Parse(xml);
940var doc = XDocument.Parse(xml);
958var doc = XDocument.Parse(xml);
974var doc = XDocument.Parse(xml);
991var doc = XDocument.Parse(xml);
1414var doc = XDocument.Load(overlayFile.FullName);
1474var doc = XDocument.Load(overlayFile.FullName);
1899var doc = XDocument.Load(overlayFile.FullName);
1932var doc = XDocument.Load(overlayFile.FullName);
1961var doc = XDocument.Load(overlayFile.FullName);
2017var doc = XDocument.Load(overlayFile.FullName);
2055var doc = XDocument.Load(overlayFile.FullName);
2091var doc = XDocument.Load(overlayFile.FullName);
2141var doc = XDocument.Load(overlayFile.FullName);
2164var doc = XDocument.Load(overlayFile.FullName);
3031XDocument? policyOverlay = null;
3037policyOverlay = XDocument.Load(configPaths[0]);
3157XDocument? generatedProject = null;
3169generatedProject = XDocument.Load(projectFilePath.FullName);
3229XDocument? generatedProject = null;
3230XDocument? generatedPolicyOverlay = null;
3271generatedProject = XDocument.Load(projectFilePath.FullName);
3373var directoryBuildProps = XDocument.Load(Path.Combine(
3392Assert.NotNull(XDocument.Load(ambientConfigPath).Descendants("packageSourceCredentials").ElementAtOrDefault(0));
3723XDocument? restoreOverlay = null;
3730restoreOverlay = XDocument.Load(policyOverlayPath);
3749var ambientConfig = XDocument.Load(ambientConfigPath);
4259XDocument? generatedProject = null;
4260XDocument? restoreOverlay = null;
4271generatedProject = XDocument.Load(projectFilePath.FullName);
4538var generatedProject = XDocument.Load(Path.Combine(workingDirectory, "integration-restore", PrebuiltAppHostServer.IntegrationProjectFileName));
4586XDocument? projectRestoreOverlay = null;
4639Assert.Equal(["*", "Aspire*"], GetPackagePatternsForKey(Assert.IsType<XDocument>(projectRestoreOverlay), "first-alias"));
5168var document = XDocument.Load(Path.Combine(restoreDirectory.FullName, "Directory.Build.props"));
5405private static XDocument LoadGeneratedPolicyOverlay(FileInfo projectFilePath)
5407var props = XDocument.Load(Path.Combine(projectFilePath.DirectoryName!, "Directory.Build.props"));
5412return XDocument.Load(Path.Combine(policyDirectory, "NuGet.Config"));
5483private static string[] GetPackagePatternsForSource(XDocument doc, string source)
5513private static string[] GetPackagePatternsForKey(XDocument doc, string sourceKey)
Aspire.Dashboard (2)
Aspire.Hosting.Azure.ApiManagement (4)
Aspire.Hosting.Dotnet (1)
Aspire.Hosting.Java (5)
Aspire.Hosting.Maui (2)
Aspire.Hosting.Maui.Tests (18)
Aspire.Hosting.Native.CodeGeneration (8)
Aspire.Hosting.RemoteHost (8)
Aspire.Hosting.RemoteHost.Tests (12)
Aspire.Hosting.Tests (2)
Aspire.Templates.Tests (8)
Aspire.TestTools (4)
Aspire.Tray.Tests (8)
ConfigurationSchemaGenerator (2)
dotnet-svcutil-lib (6)
dotnet-user-jwts (2)
dotnet-user-secrets (2)
GenerateDocumentationAndConfigFiles (2)
GenerateTemplateManifest (5)
ILCompiler.Compiler (2)
ILCompiler.ReadyToRun (2)
illink (2)
ILLink.Tasks (3)
Infrastructure.Tests (13)
Microsoft.Arcade.Common (2)
Microsoft.AspNetCore.DataProtection (3)
Microsoft.AspNetCore.OpenApi.SourceGenerators (9)
Microsoft.AspNetCore.Rewrite (2)
Microsoft.AspNetCore.Server.IntegrationTesting (4)
Microsoft.Build.Tasks.Core (13)
Microsoft.CodeAnalysis (9)
Microsoft.CodeAnalysis.Analyzers (4)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.NetAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
Microsoft.CodeAnalysis.VisualBasic (3)
Microsoft.CodeAnalysis.Workspaces (7)
Microsoft.DotNet.Arcade.Sdk (3)
Microsoft.DotNet.Build.Tasks.Installers (12)
Microsoft.DotNet.Build.Tasks.Packaging (4)
Microsoft.DotNet.Build.Tasks.VisualStudio (3)
Microsoft.DotNet.Build.Tasks.Workloads (2)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.NuGetRepack.Tasks (6)
Microsoft.DotNet.PackageTesting (1)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.XliffTasks (7)
Microsoft.Extensions.FileProviders.Embedded (2)
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (3)
Microsoft.Maui.Resizetizer (6)
Microsoft.NET.Build.Extensions.Tasks (2)
Microsoft.NET.Build.Tasks (15)
Microsoft.NET.HostModel (1)
Microsoft.NET.ProjectData (4)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (3)
Microsoft.NET.Sdk.Publish.Tasks (16)
WebConfigTransform.cs (5)
10public static XDocument Transform(XDocument? webConfig, string appName, bool configureForAzure, bool useAppHost, string? extension, string? aspNetCoreModuleName, string? aspNetCoreHostingModel, string? environmentName, string? projectFullPath)
18webConfig = XDocument.Parse(WebConfigTemplate.Template);
246public static XDocument? AddProjectGuidToWebConfig(XDocument? document, string? projectGuid, bool ignoreProjectGuid)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (7)
Microsoft.TestPlatform.Build (2)
Microsoft.TestPlatform.CrossPlatEngine (2)
Microsoft.TestPlatform.TestHostRuntimeProvider (4)
netstandard (1)
NuGet.Build.Tasks (15)
NuGet.Commands (35)
RestoreCommand\Utility\BuildAssetsUtils.cs (18)
93XDocument targetsXML = null;
94XDocument propsXML = null;
130public static XDocument GenerateMultiTargetFrameworkWarning()
132var doc = GenerateEmptyImportsFile();
192XDocument doc,
203XDocument doc,
230public static XDocument GenerateEmptyImportsFile()
232var doc = new XDocument(
315public static XDocument GenerateMSBuildFile(List<MSBuildRestoreItemGroup> groups, ProjectStyle outputType)
317XDocument doc = null;
348public static void WriteXML(string path, XDocument doc)
386public static bool HasChanges(XDocument newFile, string path, ILogger log)
395var existing = ReadExisting(path, log);
399return !XDocument.DeepEquals(existing, newFile);
406public static XDocument ReadExisting(string path, ILogger log)
408XDocument result = null;
673var propsXML = GenerateMSBuildFile(props, request.ProjectStyle);
674var targetsXML = GenerateMSBuildFile(targets, request.ProjectStyle);
NuGet.Common (15)
NuGet.Configuration (20)
NuGet.PackageManagement (28)
NuGet.Packaging (47)
NuGet.Protocol (11)
Roslyn.Diagnostics.Analyzers (2)
sdk-tasks (10)
System.Private.CoreLib.Generators (2)
System.Private.Xml.Linq (137)
System\Xml\Linq\XDocument.cs (99)
17/// An <see cref="XDocument"/> can contain:
32/// Initializes a new instance of the <see cref="XDocument"/> class.
34/// <see cref="XDocument"/>, creating an <see cref="XDocument"/> with
36/// <see cref="XDocument"/> object.
39/// Initializes a new instance of the <see cref="XDocument"/> class.
46/// Initializes a new instance of the <see cref="XDocument"/> class with the specified content.
69/// Initializes a new instance of the <see cref="XDocument"/> class
97/// Initializes a new instance of the <see cref="XDocument"/> class from an
101/// The <see cref="XDocument"/> object that will be copied.
103public XDocument(XDocument other)
159/// <see cref="XDocument"/> and initializing it from a data source containing
162/// <see cref="XmlReader"/>. Note: Use <see cref="XDocument.Parse(string)"/>
163/// to create an <see cref="XDocument"/> from a string containing XML.
164/// <seealso cref="XDocument.Parse(string)"/>
167/// Create a new <see cref="XDocument"/> based on the contents of the file
169/// <see cref="XDocument.Parse(string)"/> to create an <see cref="XDocument"/> from
172/// <seealso cref="XDocument.Parse(string)"/>
180/// A URI string referencing the file to load into a new <see cref="XDocument"/>.
183/// An <see cref="XDocument"/> initialized with the contents of the file referenced
186public static XDocument Load([StringSyntax(StringSyntaxAttribute.Uri)] string uri)
192/// Create a new <see cref="XDocument"/> based on the contents of the file
204/// A string representing the URI of the file to be loaded into a new <see cref="XDocument"/>.
210/// An <see cref="XDocument"/> initialized with the contents of the file referenced
214public static XDocument Load([StringSyntax(StringSyntaxAttribute.Uri)] string uri, LoadOptions options)
224/// Create a new <see cref="XDocument"/> and initialize its underlying XML tree using
229/// created <see cref="XDocument"/>.
232/// A new <see cref="XDocument"/> containing the contents of the passed in
235public static XDocument Load(Stream stream)
241/// Create a new <see cref="XDocument"/> and initialize its underlying XML tree using
252/// created <see cref="XDocument"/>.
258/// A new <see cref="XDocument"/> containing the contents of the passed in
261public static XDocument Load(Stream stream, LoadOptions options)
271/// Create a new <see cref="XDocument"/> and initialize its underlying XML tree using
282/// created <see cref="XDocument"/>.
291/// A new <see cref="XDocument"/> containing the contents of the passed in
294public static async Task<XDocument> LoadAsync(Stream stream, LoadOptions options, CancellationToken cancellationToken)
307/// Create a new <see cref="XDocument"/> and initialize its underlying XML tree using
312/// created <see cref="XDocument"/>.
315/// A new <see cref="XDocument"/> containing the contents of the passed in
318public static XDocument Load(TextReader textReader)
324/// Create a new <see cref="XDocument"/> and initialize its underlying XML tree using
335/// created <see cref="XDocument"/>.
341/// A new <see cref="XDocument"/> containing the contents of the passed in
344public static XDocument Load(TextReader textReader, LoadOptions options)
354/// Create a new <see cref="XDocument"/> and initialize its underlying XML tree using
365/// created <see cref="XDocument"/>.
374/// A new <see cref="XDocument"/> containing the contents of the passed in
377public static async Task<XDocument> LoadAsync(TextReader textReader, LoadOptions options, CancellationToken cancellationToken)
390/// Create a new <see cref="XDocument"/> containing the contents of the
395/// <see cref="XDocument"/>.
398/// A new <see cref="XDocument"/> containing the contents of the passed
401public static XDocument Load(XmlReader reader)
407/// Create a new <see cref="XDocument"/> containing the contents of the
412/// <see cref="XDocument"/>.
418/// A new <see cref="XDocument"/> containing the contents of the passed
421public static XDocument Load(XmlReader reader, LoadOptions options)
427XDocument d = InitLoad(reader, options);
442/// Create a new <see cref="XDocument"/> containing the contents of the
447/// <see cref="XDocument"/>.
456/// A new <see cref="XDocument"/> containing the contents of the passed
459public static Task<XDocument> LoadAsync(XmlReader reader, LoadOptions options, CancellationToken cancellationToken)
464return Task.FromCanceled<XDocument>(cancellationToken);
468private static async Task<XDocument> LoadAsyncInternal(XmlReader reader, LoadOptions options, CancellationToken cancellationToken)
475XDocument d = InitLoad(reader, options);
492private static XDocument InitLoad(XmlReader reader, LoadOptions options)
494XDocument d = new XDocument();
515/// Create a new <see cref="XDocument"/> from a string containing
519/// Create a new <see cref="XDocument"/> from a string containing
526/// An <see cref="XDocument"/> containing an XML tree initialized from the
529public static XDocument Parse(string text)
535/// Create a new <see cref="XDocument"/> from a string containing
553/// An <see cref="XDocument"/> containing an XML tree initialized from the
556public static XDocument Parse(string text, LoadOptions options)
569/// Output this <see cref="XDocument"/> to the passed in <see cref="Stream"/>.
574/// <see cref="XDocument.Save(Stream, SaveOptions)"/>) enabling
580/// The <see cref="Stream"/> to output this <see cref="XDocument"/> to.
588/// Output this <see cref="XDocument"/> to a <see cref="Stream"/>.
617/// Output this <see cref="XDocument"/> to a <see cref="Stream"/>.
653/// Output this <see cref="XDocument"/> to the passed in <see cref="TextWriter"/>.
658/// <see cref="XDocument.Save(TextWriter, SaveOptions)"/>) enabling
664/// The <see cref="TextWriter"/> to output this <see cref="XDocument"/> to.
672/// Output this <see cref="XDocument"/> to a <see cref="TextWriter"/>.
691/// Output this <see cref="XDocument"/> to an <see cref="XmlWriter"/>.
702/// Output this <see cref="XDocument"/> to a <see cref="TextWriter"/>.
727/// Outputs this <see cref="XDocument"/>'s underlying XML tree. The output can
732/// Output this <see cref="XDocument"/> to a file.
737/// <see cref="XDocument.Save(string, SaveOptions)"/>) enabling
751/// Output this <see cref="XDocument"/> to an <see cref="XmlWriter"/>.
765/// Output this <see cref="XDocument"/> to a file.
795/// Output this <see cref="XDocument"/>'s underlying XML tree to the
797/// <seealso cref="XDocument.Save(XmlWriter)"/>
801/// <see cref="XDocument"/>.
824/// Output this <see cref="XDocument"/>'s underlying XML tree to the
826/// <seealso cref="XDocument.Save(XmlWriter)"/>
830/// <see cref="XDocument"/>.
880XDocument? other = node as XDocument;
System.Xml.Linq (1)
System.Xml.XDocument (1)