54 instantiations of XDocument
aspire (3)
Commands\AddCommand.cs (1)
344var configXml = new System.Xml.Linq.XDocument(
Projects\CSharpProjectFile.cs (1)
220return new XDocument(root);
Projects\IntegrationClosureBuilder.cs (1)
128return new XDocument(new XElement("Project", propertyGroup));
aspire-tray (1)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (1)
27var document = new XDocument(new XDeclaration("1.0", "utf-8", null),
Aspire.Hosting.Dotnet (1)
DotnetProjectBuildResource.cs (1)
233var project = new XDocument(
Aspire.Hosting.Maui (2)
Utilities\MauiEnvironmentHelper.cs (2)
131var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), projectElement); 254var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), projectElement);
Aspire.Tray.Tests (1)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (1)
27var document = new XDocument(new XDeclaration("1.0", "utf-8", null),
GenerateTemplateManifest (2)
TemplateRestorePlan.cs (2)
300new XDocument(root).Save(Path.Combine(projectDirectory, $"{project.Name}.csproj")); 303new XDocument(new XElement("Solution", Projects.Select(project =>
illink (1)
ILLink.Tasks (1)
CombineLinkerXmlFiles.cs (1)
41var xdoc = new XDocument(combined);
Infrastructure.Tests (7)
Hex1bNativePublishingTests.cs (1)
305var project = new XDocument(new XElement("Project",
Shared\TestTrxBuilder.cs (1)
26var document = new XDocument(
TemplateManifest\TemplateManifestBuildTargetTests.cs (1)
34new XDocument(new XElement("Project",
TemplateManifest\TemplateManifestTestEnvironment.cs (2)
50new XDocument(new XElement("configuration", 118new XDocument(new XElement("package",
TemplateManifest\TemplateRestorePlanTests.cs (2)
161new XDocument(normalize ? TemplateRestorePlan.Normalize(source) : source).Save(path); 197new XDocument(TemplateRestorePlan.Normalize(source)).Save(path);
Microsoft.AspNetCore.DataProtection (3)
XmlEncryption\XmlEncryptionExtensions.cs (3)
29var doc = new XDocument(new XElement(element)); 111var doc = new XDocument(new XElement(element)); 131var innerDoc = new XDocument(clonedElementWhichRequiresEncryption);
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlComments\XmlComment.InheritDoc.cs (1)
381copy = new XDocument((XDocument)(object)node);
Microsoft.Build.Tasks.Core (1)
AssemblyDependency\GenerateBindingRedirects.cs (1)
338document = new XDocument(
Microsoft.CodeAnalysis (1)
InternalUtilities\XmlUtilities.cs (1)
24copy = new XDocument(((XDocument)(object)node));
Microsoft.CodeAnalysis.Workspaces (2)
Log\WorkspaceStructureLogger.cs (1)
39var document = new XDocument();
Shared\Extensions\ISymbolExtensions.cs (1)
570copy = new XDocument(((XDocument)(object)node));
Microsoft.DotNet.HotReload.Watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
1154var doc = new XDocument(solutionElement);
Microsoft.DotNet.PackageTesting (1)
VerifyClosure.cs (1)
350var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.SharedFramework.Sdk (1)
parent\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
350var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.XliffTasks (1)
Model\XlfDocument.cs (1)
49_document = new XDocument(
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (1)
Manifest.cs (1)
45var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Microsoft.NET.Build.Tasks (2)
GenerateToolsSettingsFile.cs (1)
106return new XDocument(
WriteAppConfigWithSupportedRuntime.cs (1)
158new XDocument(
Microsoft.NET.HostModel (1)
ComHost\RegFreeComManifest.cs (1)
43XDocument manifestDocument = new XDocument(new XDeclaration("1.0", "UTF-8", "yes"), manifest);
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (2)
BlazorWriteSatelliteAssemblyFile.cs (1)
47var xDocument = new XDocument(root);
CreateBlazorTrimmerRootDescriptorFile.cs (1)
72return new XDocument(roots).Root.ToString();
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
GeneratePackageAssetsTargetsFile.cs (1)
41var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
65var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
GenerateStaticWebAssetsPropsFile.cs (1)
131var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Legacy\GenerateStaticWebAssetsPropsFile50.cs (1)
80var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Legacy\GenerateV1StaticWebAssetsManifest.cs (1)
37var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
StaticWebAssetsGeneratePackagePropsFile.cs (1)
29var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
NuGet.Commands (1)
RestoreCommand\Utility\BuildAssetsUtils.cs (1)
232var doc = new XDocument(
NuGet.Configuration (1)
Settings\SettingsFile.cs (1)
211return new XDocument(configurationElement.AsXNode());
NuGet.PackageManagement (2)
Utility\MSBuildNuGetProjectSystemUtility.cs (1)
36var document = new XDocument(new XElement(rootName));
Utility\XmlUtility.cs (1)
29var document = new XDocument(new XElement(rootName));
NuGet.Packaging (5)
PackageCreation\Authoring\Manifest.cs (1)
100new XDocument(
PackageCreation\Authoring\PackageBuilder.cs (3)
1162XDocument document = new XDocument( 1215XDocument document = new XDocument(element); 1235XDocument document = new XDocument(
PackagesConfigWriter.cs (1)
401var document = new XDocument();
System.Private.Xml.Linq (2)
System\Xml\Linq\XDocument.cs (2)
494XDocument d = new XDocument(); 875return new XDocument(this);
815 references to XDocument
aspire (30)
Commands\AddCommand.cs (1)
344var configXml = new System.Xml.Linq.XDocument(
Commands\Sdk\IntegrationAssemblyNameResolver.cs (2)
25var document = XDocument.Load(projectFile.FullName);
Packaging\NuGetConfigMerger.cs (8)
14public required XDocument Document { get; init; } 175XDocument doc; 178doc = XDocument.Load(stream); 799private static async Task SaveConfigAsync(FileInfo nugetConfigFile, XDocument document) 838var doc = XDocument.Load(stream); 944XDocument doc; 947doc = XDocument.Load(stream);
Packaging\PackageChannel.cs (4)
456var document = XDocument.Load(stream); 761var document = XDocument.Load(stream);
Packaging\TemporaryNuGetConfig.cs (2)
130XDocument document; 133document = XDocument.Load(stream);
Projects\CSharpProjectFile.cs (1)
189public XDocument ToXDocument()
Projects\DotNetAppHostProject.cs (1)
263root = XDocument.Load(path).Root;
Projects\DotNetBasedAppHostServerProject.cs (4)
335var doc = projectFile.ToXDocument(); 419private void WriteScaffold(Dictionary<string, string> scaffold, XDocument projectDocument) 732var doc = XDocument.Load(versionsPropsPath);
Projects\FallbackProjectParser.cs (2)
74var doc = XDocument.Load(projectFile.FullName);
Projects\IntegrationClosureBuilder.cs (1)
119public static XDocument CreateClosureDirectoryBuildProps(string restoreDir)
Projects\JavaAppHostToolchainResolver.cs (2)
602var document = XDocument.Load(Path.Combine(aggregatorDirectory.FullName, MavenPomFileName));
Projects\PrebuiltAppHostServer.cs (2)
514XDocument document; 521document = XDocument.Load(reader);
aspire-tray (4)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (4)
27var document = new XDocument(new XDeclaration("1.0", "utf-8", null), 43var document = Parse(registration); 54private static XDocument Parse(string xml) 63return XDocument.Load(reader);
Aspire.Cli.EndToEnd.Tests (18)
CentralPackageManagementTests.cs (5)
317var appHostProject = XDocument.Load(appHostCsprojPath); 318var directoryPackagesProps = XDocument.Load(directoryPackagesPropsPath); 320static IEnumerable<XElement> FindRedisProperties(XDocument document, string propertyName)
CSharpProjectModeInitTests.cs (2)
99var nuGetConfigDoc = XDocument.Load(workspaceNuGetConfig);
EmulatedStagingBuildTests.cs (2)
260var doc = XDocument.Load(configPath);
EntityFrameworkCoreDeploymentTests.cs (2)
248var apiProject = XDocument.Load(apiProjectPath, LoadOptions.PreserveWhitespace);
Helpers\CliE2EAutomatorHelpers.cs (2)
652var document = XDocument.Load(versionsPropsPath);
Helpers\CliE2ETestHelpers.cs (4)
930var doc = XDocument.Load(versionsPropsPath); 957var doc = XDocument.Load(versionsPropsPath);
NewChannelNuGetConfigTests.cs (1)
74var packageSources = XDocument.Load(nugetConfigPath)
Aspire.Cli.Tests (138)
AssemblyMetadataChannelTests.cs (2)
44var doc = XDocument.Load(csprojPath);
Commands\InitCommandTests.cs (1)
2344var root = XDocument.Load(nugetConfigPath).Root ?? throw new InvalidOperationException("Empty NuGet.config.");
Commands\NewCommandTests.cs (7)
727var doc = XDocument.Load(Path.Combine(outputPath, "nuget.config")); 737private static string[] GetPackagePatternsForSource(XDocument doc, string source) 1204var document = XDocument.Load(nugetConfig.FullName); 2156var document = XDocument.Load(nugetConfigFile.FullName);
Commands\UpdateCommandRepositoryToolsTests.cs (2)
541Assert.Equal("Aspire.AppHost.Sdk/" + targetVersion, XDocument.Load(appHost.FullName).Root!.Attribute("Sdk")!.Value); 542var packages = XDocument.Load(packagesPath).Descendants("PackageVersion").ToArray();
Packaging\NuGetConfigMergerSnapshotTests.cs (10)
73var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 135var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 196var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 255var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 319var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
Packaging\NuGetConfigMergerTests.cs (24)
73var xml = XDocument.Load(targetConfigPath); 114var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 153var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 197var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 237var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 347var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 397var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 466var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 530var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 586var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 668var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 718var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
Packaging\PackagingServiceTests.cs (2)
1129var doc = XDocument.Load(nugetConfigPath);
Projects\AppHostServerProjectTests.cs (19)
107Assert.Equal(repoRoot.FullName, XDocument.Load(projectFilePath).Descendants("RestoreRootConfigDirectory").Single().Value); 261var doc = XDocument.Load(projectPath); 281var doc = XDocument.Load(projectPath); 303var document = XDocument.Load(projectPath); 331var document = XDocument.Load(projectPath); 356var document = XDocument.Load(projectPath); 537var projectDoc = XDocument.Parse(projectContent); 594var projectDoc = XDocument.Load(projectFilePath); 634var projectDoc = XDocument.Load(projectFilePath); 684var projectDoc = XDocument.Load(projectFilePath);
Projects\PrebuiltAppHostServerTests.cs (52)
375var doc = XDocument.Parse(xml); 395var doc = XDocument.Parse(xml); 421var doc = XDocument.Parse(xml); 437var doc = XDocument.Parse(xml); 447var doc = XDocument.Parse(xml); 458var doc = IntegrationClosureBuilder.CreateClosureDirectoryBuildProps("/custom/output/path"); 552var doc = XDocument.Parse(xml); 565var doc = XDocument.Parse(xml); 579var doc = XDocument.Parse(xml); 590var doc = XDocument.Parse(xml); 605var doc = XDocument.Parse(xml); 617var doc = XDocument.Parse(xml); 637var doc = XDocument.Parse(xml); 650var doc = XDocument.Parse(xml); 671var doc = XDocument.Parse(xml); 914var doc = XDocument.Load(result.ConfigFile.FullName); 973var doc = XDocument.Load(result.ConfigFile.FullName); 1033var doc = XDocument.Load(result.ConfigFile.FullName); 1062var doc = XDocument.Load(result.ConfigFile.FullName); 1091var doc = XDocument.Load(result.ConfigFile.FullName); 1138var doc = XDocument.Load(result.ConfigFile.FullName); 1184var doc = XDocument.Load(result.ConfigFile.FullName); 1207var doc = XDocument.Load(result.ConfigFile.FullName); 2017XDocument? tempConfigDoc = null; 2023tempConfigDoc = XDocument.Load(configPath!); 2149XDocument? generatedProject = null; 2166generatedProject = XDocument.Load(projectFilePath.FullName); 2297XDocument? generatedProject = null; 2308generatedProject = XDocument.Load(projectFilePath.FullName); 3216private static string[] GetPackagePatternsForSource(XDocument doc, string source)
Templating\TemplateNuGetConfigServiceTests.cs (19)
60var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config")); 101var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config")); 145var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config")); 333var doc = XDocument.Load(nugetConfigFile.FullName); 392var doc = XDocument.Load(nugetConfigFile.FullName); 513var doc = XDocument.Load(nugetConfigFile.FullName); 1076private static string[] GetPackagePatternsForSource(XDocument doc, string source) 1125var doc = XDocument.Load(configPath); 1210var doc = XDocument.Load(configPath); 1268var doc = XDocument.Load(configPath);
Aspire.Dashboard (2)
Model\TextVisualizerViewModel.cs (2)
75var document = XDocument.Parse(text.Trim());
Aspire.Hosting.Dotnet (1)
DotnetProjectBuildResource.cs (1)
233var project = new XDocument(
Aspire.Hosting.Java (5)
JavaHostingExtensions.cs (2)
2050var document = XDocument.Load(pomPath);
JavaVersionDetector.cs (3)
85XDocument document; 88document = XDocument.Load(pomPath); 179private static IEnumerable<XElement> GetProfiles(XDocument document) =>
Aspire.Hosting.Maui (2)
Utilities\MauiEnvironmentHelper.cs (2)
131var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), projectElement); 254var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), projectElement);
Aspire.Hosting.Maui.Tests (18)
MauiEnvironmentHelperTests.cs (18)
27var doc = XDocument.Parse(content); 42var doc = XDocument.Parse(content); 61var doc = XDocument.Parse(content); 78var doc = XDocument.Parse(content); 95var doc = XDocument.Parse(content); 120var doc = XDocument.Parse(content); 135var doc = XDocument.Parse(content); 154var doc = XDocument.Parse(content); 172var doc = XDocument.Parse(content);
Aspire.Hosting.RemoteHost (8)
AtsCapabilityScanner.cs (8)
1253var xmlDoc = LoadXmlDocumentation(type.Assembly); 1330XDocument? xmlDoc, 3418private static readonly ConcurrentDictionary<string, XDocument?> s_xmlDocCache = new(StringComparer.Ordinal); 3469public static XDocument? LoadXmlDocumentation(Assembly assembly) 3485return XDocument.Load(xmlPath); 3503public static string? GetXmlDocSummary(XDocument? xmlDoc, string memberName) 3525private static AtsDocumentationInfo? GetXmlDocumentation(XDocument? xmlDoc, string memberName, string? fallbackSummary = null) 3537private static XElement? FindXmlDocumentationMember(XDocument? xmlDoc, string memberName)
Aspire.Hosting.RemoteHost.Tests (12)
AtsCapabilityScannerTests.cs (12)
1180var doc = System.Xml.Linq.XDocument.Parse(""" 1199var doc = System.Xml.Linq.XDocument.Parse(""" 1218var doc = System.Xml.Linq.XDocument.Parse(""" 1237var doc = System.Xml.Linq.XDocument.Parse(""" 1259var doc = System.Xml.Linq.XDocument.Parse(""" 1280var first = AtsCapabilityScanner.LoadXmlDocumentation(assembly); 1281var second = AtsCapabilityScanner.LoadXmlDocumentation(assembly);
Aspire.Hosting.Tests (2)
MSBuildTests.cs (2)
273var document = XDocument.Load(stream);
Aspire.Templates.Tests (4)
NewUpAndBuildStandaloneTemplateTests.cs (2)
56var project = XDocument.Load(projectPath);
NewUpAndBuildSupportProjectTemplatesTests.cs (2)
66var project = XDocument.Load(projectPath);
Aspire.Tray.Tests (6)
MacTrayStartupSettingsTests.cs (2)
18var xml = XDocument.Parse(MacTrayStartupSettings.Serialize(cli));
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (4)
27var document = new XDocument(new XDeclaration("1.0", "utf-8", null), 43var document = Parse(registration); 54private static XDocument Parse(string xml) 63return XDocument.Load(reader);
ConfigurationSchemaGenerator (2)
ConfigSchemaEmitter.cs (2)
436var doc = XDocument.Parse(docComment);
dotnet-svcutil-lib (6)
Shared\MSBuildProj.cs (4)
171XDocument projDefinition = XDocument.Parse(projectText); 428XDocument doc = XDocument.Load(filePath);
Shared\Utilities\RuntimeEnvironmentHelper.cs (2)
81var doc = XDocument.Parse(new StreamReader(stream).ReadToEnd());
dotnet-user-jwts (2)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (2)
18var projectDocument = XDocument.Load(projectPath, LoadOptions.PreserveWhitespace);
dotnet-user-secrets (2)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (2)
18var projectDocument = XDocument.Load(projectPath, LoadOptions.PreserveWhitespace);
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
GenerateTemplateManifest (5)
ComponentManifest.cs (2)
114var document = XDocument.Load(stream);
Program.cs (2)
126var config = XDocument.Load(nugetConfigPath);
TemplateRestorePlan.cs (1)
138documents.Add(Path.GetFullPath(path), XDocument.Load(path).Root!);
ILCompiler.Compiler (2)
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (2)
64_document = XDocument.Load(xmlReader, LoadOptions.SetLineInfo).CreateNavigator(); 75_document = XDocument.Load(documentStream, LoadOptions.SetLineInfo).CreateNavigator();
ILCompiler.ReadyToRun (2)
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (2)
64_document = XDocument.Load(xmlReader, LoadOptions.SetLineInfo).CreateNavigator(); 75_document = XDocument.Load(documentStream, LoadOptions.SetLineInfo).CreateNavigator();
illink (2)
ILLink.Tasks (3)
CombineLinkerXmlFiles.cs (3)
33XDocument subFile = XDocument.Load(linkerXmlFile.ItemSpec); 41var xdoc = new XDocument(combined);
Infrastructure.Tests (39)
Hex1bNativePublishingTests.cs (9)
213var repositoryTargets = XDocument.Load(Path.Combine(RepoRoot.Path, "Directory.Build.targets")); 216var hostingTargets = XDocument.Load(Path.Combine(RepoRoot.Path, "src", "Aspire.Hosting", "buildTransitive", "Aspire.Hosting.targets")); 218var hostingProject = XDocument.Load(Path.Combine(RepoRoot.Path, "src", "Aspire.Hosting", "Aspire.Hosting.csproj")); 228var signingProps = XDocument.Load(Path.Combine(RepoRoot.Path, "eng", "Signing.props")); 305var project = new XDocument(new XElement("Project",
MicrosoftTestingPlatformTests.cs (2)
63var target = XDocument.Load(Path.Combine(RepoRoot.Path, "eng", "Xunit3", "Microsoft.Testing.Platform.targets"));
NuGetConfigTests.cs (5)
15var document = XDocument.Load(Path.Combine(RepoRoot.Path, "tests", "Shared", "TemplatesTesting", "data", "nuget8.config")); 36var root = XDocument.Load(Path.Combine(RepoRoot.Path, "NuGet.config")).Root!; 66var document = XDocument.Load(Path.Combine(RepoRoot.Path, "NuGet.config"));
Pipelines\NpmCliPackageTests.cs (5)
435var signingProps = XDocument.Parse(await ReadRepoFileAsync("eng/Signing.props")); 505var signingProps = XDocument.Parse(await ReadRepoFileAsync("eng/Signing.props")); 812XDocument document,
Pipelines\TrayBundleTests.cs (13)
126var project = LoadProject("eng/Bundle.proj"); 142var project = LoadProject("src/Aspire.Tray/Mac/Aspire.Tray.Mac.csproj"); 149var signing = LoadProject("eng/Signing.props"); 154var traySigning = LoadProject("eng/pipelines/SignTray.proj"); 223var project = LoadProject("eng/Bundle.proj"); 233var solution = LoadProject("Aspire.slnx"); 235var testProject = LoadProject(testProjectPath); 266var project = LoadProject("eng/Bundle.proj"); 348var signing = LoadProject("eng/Signing.props"); 353var bundle = LoadProject("eng/Bundle.proj"); 467private static XDocument LoadProject(string path) => XDocument.Load(Path.Combine(RepoRoot.Path, path)); 469private static XElement Target(XDocument project, string name)
Shared\TestTrxBuilder.cs (1)
26var document = new XDocument(
TemplateManifest\TemplateManifestBuildTargetTests.cs (2)
31var templateProject = XDocument.Load(Path.Combine(RepoRoot.Path, "src", "Aspire.ProjectTemplates", "Aspire.ProjectTemplates.csproj"));
TemplateManifest\TemplateManifestCacheTests.cs (2)
72var solution = XDocument.Load(Path.Combine(restoreDirectory, "TemplateDependencies.slnx"));
Microsoft.Arcade.Common (2)
NupkgInfoFactory.cs (2)
53XDocument doc = XDocument.Load(nuspecFileStream, LoadOptions.PreserveWhitespace);
Microsoft.AspNetCore.DataProtection (3)
XmlEncryption\XmlEncryptionExtensions.cs (3)
29var doc = new XDocument(new XElement(element)); 111var doc = new XDocument(new XElement(element)); 131var innerDoc = new XDocument(clonedElementWhichRequiresEncryption);
Microsoft.AspNetCore.OpenApi.SourceGenerators (9)
XmlComments\XmlComment.cs (6)
36var doc = XDocument.Parse(xml, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); 67private static void ResolveListTags(XDocument document) 98private static void ResolveCodeTags(XDocument document, string tagName, string codeBlockDelimiter) 112private static void ResolveParamRefTags(XDocument document) 145private static void ResolveParaTags(XDocument document)
XmlComments\XmlComment.InheritDoc.cs (3)
197var document = XDocument.Parse(inheritedDocumentation, LoadOptions.PreserveWhitespace); 381copy = new XDocument((XDocument)(object)node);
Microsoft.AspNetCore.Rewrite (2)
IISUrlRewrite\UrlRewriteFileParser.cs (2)
23var xmlDoc = XDocument.Load(reader, LoadOptions.SetLineInfo);
Microsoft.AspNetCore.Server.IntegrationTesting (4)
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (2)
154var webConfig = XDocument.Load(webConfigFilePath);
xunit\IISExpressAncmSchema.cs (2)
31XDocument ancmConfig; 35ancmConfig = XDocument.Load(ancmConfigPath);
Microsoft.Build.Tasks.Core (13)
AssemblyDependency\GenerateBindingRedirects.cs (7)
70var doc = LoadAppConfig(AppConfigFile); 119var outputDoc = LoadAppConfig(outputAppConfigFile); 333private XDocument LoadAppConfig(ITaskItem appConfigItem) 335XDocument document; 350private XDocument LoadAppConfig(AbsolutePath appConfigFile) 352XDocument document; 356document = XDocument.Load(xr);
GenerateResource.cs (2)
3128XDocument doc = XDocument.Load(xmlReader, LoadOptions.PreserveWhitespace);
ResourceHandling\MSBuildResXReader.cs (2)
33XDocument doc = XDocument.Load(xmlReader, LoadOptions.PreserveWhitespace);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (2)
384XDocument document; 390document = XDocument.Parse($"<Task>{taskBody}</Task>");
Microsoft.CodeAnalysis (9)
DocumentationComments\DocumentationCommentIncludeCache.cs (6)
16internal sealed class DocumentationCommentIncludeCache : CachingFactory<string, KeyValuePair<string, XDocument>> 35public XDocument GetOrMakeDocument(string resolvedPath) 49private static KeyValuePair<string, XDocument> MakeValue(XmlReferenceResolver resolver, string resolvedPath) 57var document = XDocument.Load(reader, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); 68private static bool KeyValueEquality(string resolvedPath, KeyValuePair<string, XDocument> pathAndDocument)
InternalUtilities\XmlUtilities.cs (1)
24copy = new XDocument(((XDocument)(object)node));
RuleSet\RuleSetProcessor.cs (2)
65XDocument? ruleSetDocument = null; 73ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.Analyzers (4)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ResourceStringsFormat.cs (2)
75var parsedDocument = XDocument.Parse(sourceTextStr, LoadOptions.PreserveWhitespace);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.CSharp (3)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (3)
92XDocument doc; 98doc = XDocument.Parse(unprocessed, LoadOptions.PreserveWhitespace); 337XDocument doc;
Microsoft.CodeAnalysis.NetAnalyzers (2)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
97var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
AbstractResxGenerator.cs (1)
444foreach (var node in XDocument.Load(new SourceTextReader(text)).Descendants("data"))
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.VisualBasic (3)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (3)
173Dim doc As XDocument 177doc = XDocument.Parse(unprocessed, LoadOptions.PreserveWhitespace) 498Dim doc As XDocument
Microsoft.CodeAnalysis.Workspaces (7)
Log\WorkspaceStructureLogger.cs (4)
33public async Task<XDocument> BuildWorkspaceStructureAsync( 39var document = new XDocument(); 134var msbuildProject = XDocument.Load(project.FilePath, LoadOptions.None);
Shared\Extensions\ISymbolExtensions.cs (3)
391var document = XDocument.Parse(inheritedDocumentation.FullXmlFragment, LoadOptions.PreserveWhitespace); 570copy = new XDocument(((XDocument)(object)node));
Microsoft.DotNet.Arcade.Sdk (3)
src\ExtractNgenMethodList.cs (2)
57var document = XDocument.Load(TaskEnvironment.GetAbsolutePath(IbcXmlFilePath));
src\GenerateResxSource.cs (1)
110foreach (var node in XDocument.Load(TaskEnvironment.GetAbsolutePath(ResourceFile)).Descendants("data"))
Microsoft.DotNet.Build.Tasks.Installers (12)
src\CreateWixBuildWixpack.cs (5)
239IngestDefineVariablesFromString(XDocument.Load(filePath).ToString()); 263XDocument xmlDocument = XDocument.Load(filePath); 558var doc = XDocument.Load(copiedXmlFilePath);
src\CreateWixCommandPackageDropBase.cs (3)
201XDocument doc = XDocument.Load(wixObjFilePath); 252private void ProcessXPath(XDocument doc, string xpath, AbsolutePath outputPath, XmlNamespaceManager nsmgr, int pathField1, int pathField2 = 0)
src\GenerateMacOSDistributionFile.cs (2)
42XDocument document = XDocument.Load(TaskEnvironment.GetAbsolutePath(TemplatePath));
src\StabilizeWixFileId.cs (2)
57XDocument content = XDocument.Load(TaskEnvironment.GetAbsolutePath(SourceFile));
Microsoft.DotNet.Build.Tasks.Packaging (4)
GenerateNuSpec.cs (2)
162var nuspec = XDocument.Load(memStream);
PackageIndex.cs (2)
216XDocument frameworkList = XDocument.Load(frameworkListPath);
Microsoft.DotNet.Build.Tasks.VisualStudio (3)
Vsix\FinalizeInsertionVsixFile.cs (3)
50var document = XDocument.Load(stream); 75internal void UpdateInstallationElement(XDocument document)
Microsoft.DotNet.Build.Tasks.Workloads (2)
Msi\WixDocument.cs (2)
17private XDocument _doc; 33_doc = XDocument.Load(path);
Microsoft.DotNet.HotReload.Watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
1154var doc = new XDocument(solutionElement);
Microsoft.DotNet.NuGetRepack.Tasks (6)
src\NuGetVersionUpdater.cs (4)
32public XDocument SpecificationXml { get; } 42XDocument specificationXml, 114XDocument nuspecXml = null; 129nuspecXml = XDocument.Load(nuspecStream);
src\ReplacePackageParts.cs (2)
139var nuspecXml = XDocument.Load(nuspecStream);
Microsoft.DotNet.PackageTesting (1)
VerifyClosure.cs (1)
350var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.SharedFramework.Sdk (1)
parent\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
350var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.XliffTasks (7)
Model\TranslatableXmlDocument.cs (2)
15protected XDocument Document { get; private set; } 19Document = XDocument.Load(reader);
Model\XDocumentExtensions.cs (1)
16public static void SaveCustom(this XDocument document, TextWriter writer)
Model\XlfDocument.cs (2)
29private XDocument _document; 41_document = XDocument.Load(reader);
Tasks\TransformTemplates.cs (2)
73XDocument templateXml = XDocument.Load(templatePath);
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\ManifestParser.cs (2)
36var document = XDocument.Load(stream);
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (3)
GenerateEmbeddedResourcesManifest.cs (1)
36var document = manifest.ToXmlDocument();
Manifest.cs (2)
43public XDocument ToXmlDocument() 45var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Microsoft.Maui.Resizetizer (6)
GeneratePackageAppxManifest.cs (3)
53 var appx = XDocument.Load(AppxManifest.ItemSpec); 69 void UpdateManifest(XDocument appx)
GenerateTizenManifest.cs (3)
65 var manifest = XDocument.Load(_tizenManifestFilePath); 81 void UpdateManifest(XDocument tizenManifest)
Microsoft.NET.Build.Extensions.Tasks (2)
parent\Common\ConflictResolution\FrameworkListReader.cs (2)
64var frameworkList = XDocument.Load(frameworkListPath);
Microsoft.NET.Build.Tasks (15)
GenerateToolsSettingsFile.cs (1)
41internal static XDocument GenerateDocument(string entryPointRelativePath, string commandName, string commandRunner, string runtimeIdentifier,
parent\Common\ConflictResolution\FrameworkListReader.cs (2)
64var frameworkList = XDocument.Load(frameworkListPath);
ResolveRuntimePackAssets.cs (2)
174XDocument frameworkListDoc = XDocument.Load(absoluteRuntimeListPath);
ResolveTargetingPackAssets.cs (3)
366XDocument frameworkListDoc = XDocument.Load(definition.FrameworkListPath); 456XDocument frameworkListDoc)
StoreArtifactParser.cs (2)
19var doc = XDocument.Load(filterFile);
WriteAppConfigWithSupportedRuntime.cs (5)
37XDocument doc = LoadAppConfig(AppConfigFile); 55XDocument doc, 152private XDocument LoadAppConfig(ITaskItem appConfigItem) 154XDocument document; 165document = XDocument.Load(appConfigPath.Value);
Microsoft.NET.HostModel (1)
ComHost\RegFreeComManifest.cs (1)
43XDocument manifestDocument = new XDocument(new XDeclaration("1.0", "UTF-8", "yes"), manifest);
Microsoft.NET.ProjectData (4)
FrameworkListExpander.cs (2)
63 XDocument doc; 66 doc = XDocument.Load(manifestPath, LoadOptions.None);
SdkKnownFrameworkReferenceResolver.cs (2)
69 XDocument doc; 72 doc = XDocument.Load(propsPath, LoadOptions.None);
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (3)
BlazorReadSatelliteAssemblyFile.cs (2)
21var document = XDocument.Load(ReadFile.ItemSpec);
BlazorWriteSatelliteAssemblyFile.cs (1)
47var xDocument = new XDocument(root);
Microsoft.NET.Sdk.Publish.Tasks (16)
Tasks\GenerateEnvTransform.cs (6)
38XDocument templateContentDocument = XDocument.Parse(templateContent); 40XDocument? envTransformDoc = GenerateEnvTransformDocument(templateContentDocument, WebConfigEnvironmentVariables); 54public XDocument? GenerateEnvTransformDocument(XDocument templateContentDocument, string? webConfigEnvironmentVariables) 72XDocument updatedContent = templateContentDocument;
Tasks\TransformWebConfig.cs (3)
74XDocument? webConfigXml = null; 110webConfigXml = XDocument.Load(publishWebConfigPath); 128XDocument? transformedConfig = WebConfigTransform.Transform(
WebConfigTelemetry.cs (2)
29public static XDocument? AddTelemetry(XDocument? webConfig, string? projectGuid, bool ignoreProjectGuid, string? solutionFileFullPath, string? projectFileFullPath)
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)
GeneratePackageAssetsTargetsFile.cs (1)
41var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
65var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
GenerateStaticWebAssetsPropsFile.cs (1)
131var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Legacy\GenerateStaticWebAssetsPropsFile50.cs (1)
80var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Legacy\GenerateV1StaticWebAssetsManifest.cs (2)
37var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes")); 60private void PersistManifest(XDocument document, XmlWriterSettings settings)
StaticWebAssetsGeneratePackagePropsFile.cs (1)
29var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Microsoft.TestPlatform.Build (2)
Tasks\TestTaskUtils.cs (2)
274XDocument document; 277document = XDocument.Load(settingsFile);
Microsoft.TestPlatform.CrossPlatEngine (2)
TestEngine.cs (2)
575XDocument document = XDocument.Parse(runsettings);
Microsoft.TestPlatform.TestHostRuntimeProvider (4)
Hosting\AppxManifestFile.cs (2)
21var doc = XDocument.Load(filePath);
Hosting\DefaultTestHostManager.cs (2)
588var doc = XDocument.Load(uwpSource);
netstandard (1)
netstandard.cs (1)
2271[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XDocument))]
NuGet.Build.Tasks (15)
src\nuget-client\build\Shared\XmlUtility.cs (15)
13/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. 15/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 16/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 17internal static XDocument Load(string path) 23/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. Optionally, whitespace can be preserved. 25/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 27/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 28internal static XDocument Load(string path, LoadOptions options) 33return XDocument.Load(xmlReader, options); 37/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a stream. 40/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 41internal static XDocument Load(Stream input) 51/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 52internal static XDocument Load(Stream input, LoadOptions options) 56return XDocument.Load(reader, options);
NuGet.Commands (35)
RestoreCommand\MSBuildOutputFile.cs (2)
22public XDocument Content { get; } 24public MSBuildOutputFile(string path, XDocument content)
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);
src\nuget-client\build\Shared\XmlUtility.cs (15)
13/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. 15/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 16/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 17internal static XDocument Load(string path) 23/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. Optionally, whitespace can be preserved. 25/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 27/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 28internal static XDocument Load(string path, LoadOptions options) 33return XDocument.Load(xmlReader, options); 37/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a stream. 40/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 41internal static XDocument Load(Stream input) 51/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 52internal static XDocument Load(Stream input, LoadOptions options) 56return XDocument.Load(reader, options);
NuGet.Common (15)
src\nuget-client\build\Shared\XmlUtility.cs (15)
13/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. 15/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 16/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 17internal static XDocument Load(string path) 23/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. Optionally, whitespace can be preserved. 25/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 27/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 28internal static XDocument Load(string path, LoadOptions options) 33return XDocument.Load(xmlReader, options); 37/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a stream. 40/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 41internal static XDocument Load(Stream input) 51/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 52internal static XDocument Load(Stream input, LoadOptions options) 56return XDocument.Load(reader, options);
NuGet.Configuration (20)
Settings\SettingsFile.cs (3)
53private readonly XDocument _xDocument; 116XDocument config = ExecuteSynchronized(() => 208private XDocument CreateDefaultConfig()
src\nuget-client\build\Shared\XmlUtility.cs (15)
13/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. 15/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 16/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 17internal static XDocument Load(string path) 23/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. Optionally, whitespace can be preserved. 25/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 27/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 28internal static XDocument Load(string path, LoadOptions options) 33return XDocument.Load(xmlReader, options); 37/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a stream. 40/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 41internal static XDocument Load(Stream input) 51/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 52internal static XDocument Load(Stream input, LoadOptions options) 56return XDocument.Load(reader, options);
Utility\FileSystemUtility.cs (2)
16internal static XDocument GetOrCreateDocument(XDocument content, string fullPath)
NuGet.PackageManagement (28)
ConsoleProjectContext.cs (1)
27public XDocument OriginalPackagesConfig { get; set; }
EmptyNuGetProjectContext.cs (1)
31public XDocument OriginalPackagesConfig { get; set; }
FileModifiers\XmlTransformer.cs (2)
76var transformDocument = MSBuildNuGetProjectSystemUtility.GetOrCreateDocument(xmlFragment.Name, targetPath, projectSystem); 121var document = XmlUtility.GetOrCreateDocument(xmlFragment.Name,
INuGetProjectContext.cs (1)
53XDocument OriginalPackagesConfig { get; set; }
Projects\PackagesConfigNuGetProject.cs (3)
258public XDocument GetPackagesConfig() 278return XDocument.Load(stream); 328var xml = GetPackagesConfig();
src\nuget-client\build\Shared\XmlUtility.cs (15)
13/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. 15/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 16/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 17internal static XDocument Load(string path) 23/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. Optionally, whitespace can be preserved. 25/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 27/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 28internal static XDocument Load(string path, LoadOptions options) 33return XDocument.Load(xmlReader, options); 37/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a stream. 40/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 41internal static XDocument Load(Stream input) 51/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 52internal static XDocument Load(Stream input, LoadOptions options) 56return XDocument.Load(reader, options);
Utility\MSBuildNuGetProjectSystemUtility.cs (2)
25internal static XDocument GetOrCreateDocument(XName rootName, string path, IMSBuildProjectSystem msBuildNuGetProjectSystem) 36var document = new XDocument(new XElement(rootName));
Utility\XmlUtility.cs (3)
13public static XDocument GetOrCreateDocument(XName rootName, string root, string path, INuGetProjectContext nuGetProjectContext) 27public static XDocument CreateDocument(XName rootName, string root, string path, INuGetProjectContext nuGetProjectContext) 29var document = new XDocument(new XElement(rootName));
NuGet.Packaging (47)
Core\NuspecCoreReader.cs (1)
27public NuspecCoreReader(XDocument xml)
Core\NuspecCoreReaderBase.cs (5)
20private readonly XDocument _xml; 67public NuspecCoreReaderBase(XDocument xml) 206public XDocument Xml 216private static XDocument LoadXml(Stream stream, bool leaveStreamOpen) 226return XDocument.Load(xmlReader, LoadOptions.None);
NuspecReader.cs (2)
81public NuspecReader(XDocument xml) 103public NuspecReader(XDocument xml, IFrameworkNameProvider frameworkProvider)
PackageCreation\Authoring\Manifest.cs (5)
123XDocument document; 131document = XDocument.Parse(content); 164private static string GetSchemaNamespace(XDocument document) 180private static void ValidateManifestSchema(XDocument document, string schemaNamespace) 210private static void CheckSchemaVersion(XDocument document)
PackageCreation\Authoring\ManifestReader.cs (1)
24public static Manifest ReadManifest(XDocument document)
PackageCreation\Authoring\PackageBuilder.cs (3)
1162XDocument document = new XDocument( 1215XDocument document = new XDocument(element); 1235XDocument document = new XDocument(
PackagesConfigReader.cs (4)
21private readonly XDocument _doc; 28public PackagesConfigReader(XDocument xml) 38public PackagesConfigReader(IFrameworkNameProvider frameworkMappings, XDocument xml) 92_doc = XDocument.Load(stream);
PackagesConfigWriter.cs (5)
27private XDocument _xDocument; 66_xDocument = XDocument.Load(stream); 110_xDocument = XDocument.Load(stream); 250public void UpdateOrAddPackageEntry(XDocument originalConfig, PackageReference newEntry) 401var document = new XDocument();
Rules\DependenciesGroupsForEachTFMRule.cs (1)
191var nuspec = packageNuspec.Xml;
Rules\InvalidUndottedFrameworkRule.cs (4)
46internal static IEnumerable<PackagingLogMessage> Validate(XDocument xml, IEnumerable<string> files) 143internal static IEnumerable<PackagingLogMessage> ValidateFrameworkAssemblies(XDocument xml, XElement metadataNode) 265private static XDocument LoadXml(Stream stream) 275return XDocument.Load(xmlReader, LoadOptions.None);
Rules\ReferencesInNuspecMatchRefAssetsRule.cs (1)
35var nuspec = packageNuspec.Xml;
src\nuget-client\build\Shared\XmlUtility.cs (15)
13/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. 15/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 16/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 17internal static XDocument Load(string path) 23/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a file. Optionally, whitespace can be preserved. 25/// <param name="path">The complete file path to be read into a new <see cref="System.Xml.Linq.XDocument"/>.</param> 27/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified file.</returns> 28internal static XDocument Load(string path, LoadOptions options) 33return XDocument.Load(xmlReader, options); 37/// Creates a new <see cref="System.Xml.Linq.XDocument"/> from a stream. 40/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 41internal static XDocument Load(Stream input) 51/// <returns>An <see cref="System.Xml.Linq.XDocument"/> that contains the contents of the specified stream.</returns> 52internal static XDocument Load(Stream input, LoadOptions options) 56return XDocument.Load(reader, options);
NuGet.Protocol (11)
LegacyFeed\LegacyFeedCapabilityResourceV2Feed.cs (3)
70XDocument? document; 124public static DataServiceMetadata? Extract(XDocument schemaDocument) 172XDocument schemaDocument,
LegacyFeed\V2FeedParser.cs (7)
312private IEnumerable<V2FeedPackageInfo> ParsePage(XDocument doc, string? id, MetadataReferenceCache metadataCache) 448Task<XDocument?>? docRequest = LoadXmlAsync(uri, cacheKey, ignoreNotFounds, sourceCacheContext, log, token); 459var doc = await docRequest; 518internal async Task<XDocument?> LoadXmlAsync( 626internal static string? GetNextUrl(XDocument doc) 638internal static async Task<XDocument> LoadXmlAsync(Stream stream, CancellationToken token) 650return XDocument.Load(xmlReader, LoadOptions.None);
RemoteRepositories\RemoteV2FindPackageByIdResource.cs (1)
506var doc = await V2FeedParser.LoadXmlAsync(httpSourceResult.Stream!, cancellationToken);
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
sdk-tasks (10)
GetDependencyInfo.cs (2)
30XDocument document = XDocument.Load(VersionDetailsXmlFile);
OverrideAndCreateBundledNETCoreAppPackageVersion.cs (8)
46var stage0Doc = XDocument.Load(Stage0BundledVersionsPath); 47var stage2Doc = XDocument.Load(Stage2BundledVersionsPath); 160var stage0Versions = LoadDownlevelRuntimePackVersions(XDocument.Load(stage0Path)) 165var stage2Doc = XDocument.Load(stage2Path, LoadOptions.PreserveWhitespace); 187private static IEnumerable<XElement> LoadDownlevelRuntimePackVersions(XDocument doc)
System.Private.CoreLib.Generators (2)
NativeRuntimeEventSourceGenerator.cs (2)
36var manifest = XDocument.Parse(manifestText);
System.Private.Xml.Linq (137)
System\Xml\Linq\XContainer.cs (4)
20/// <see cref="XDocument"/> and <see cref="XElement"/>. 245settings.ConformanceLevel = this is XDocument ? ConformanceLevel.Document : ConformanceLevel.Fragment; 1386if (this is XDocument) 1419if (this is XDocument)
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\XElement.cs (6)
547/// <see cref="XmlReader"/>. Note: Use <see cref="XDocument.Parse(string)"/> 548/// to create an <see cref="XDocument"/> from a string containing XML. 549/// <seealso cref="XDocument.Load(string)" /> 559/// <seealso cref="XDocument.Parse(string)"/> 582/// <seealso cref="XDocument.Load(string, LoadOptions)"/> 2125if (node is XDocument) throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.Document));
System\Xml\Linq\XNode.cs (4)
23/// <see cref="XDocument"/>, 594/// Two <see cref="XDocument"/>s are equal if their root nodes are equal. Two 700XDocument? n = this as XDocument;
System\Xml\Linq\XNodeEqualityComparer.cs (2)
31/// Two <see cref="XDocument"/>s are equal if their root nodes are equal. Two 70/// Two <see cref="XDocument"/>s are equal if their root nodes are equal. Two
System\Xml\Linq\XNodeReader.cs (7)
113if (o is XDocument) 294if (o.parent != null && o.parent.parent == null && o.parent is XDocument) 300if (_parent is XDocument) 849XDocument? d = _source as XDocument; 1184private bool ReadIntoDocument(XDocument d) 1261if (n.parent == null || (n.parent.parent == null && n.parent is XDocument))
System\Xml\Linq\XObject.cs (3)
47public XDocument? Document 54XDocument? doc = n as XDocument;
System\Xml\Linq\XText.cs (2)
87if (parent is XDocument) 113return parent is XDocument ?
System\Xml\Schema\XNodeValidator.cs (6)
49source = ((XDocument)source).Root!; 457/// Validate a <see cref="XDocument"/> 464public static void Validate(this XDocument source, XmlSchemaSet schemas, ValidationEventHandler? validationEventHandler) 470/// Validate a <see cref="XDocument"/> 477/// <param name="addSchemaInfo">If enabled the <see cref="XDocument"/> and the corresponding 480public static void Validate(this XDocument source, XmlSchemaSet schemas, ValidationEventHandler? validationEventHandler, bool addSchemaInfo)
System\Xml\XPath\XNodeNavigator.cs (4)
279XElement? root = ((XDocument)_source).Root; 366if ((TextMask & mask) != 0 && c.GetParent() == null && c is XDocument) 545if ((TextMask & mask) != 0 && container.GetParent() == null && container is XDocument) 931if (text.GetParent() is XDocument) throw new ArgumentException(SR.Format(SR.Argument_CreateNavigator, XmlNodeType.Whitespace));
System.Xml.Linq (1)
System.Xml.Linq.cs (1)
13[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XDocument))]
System.Xml.XDocument (1)
src\runtime\artifacts\obj\System.Xml.XDocument\Release\net11.0\System.Xml.XDocument.Forwards.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XDocument))]