51 instantiations of XDocument
illink (1)
ILLink.Tasks (1)
CombineLinkerXmlFiles.cs (1)
41var xdoc = new XDocument(combined);
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.Grpc.JsonTranscoding.Tests (3)
UnaryServerCallHandlerTests.cs (3)
1138var requestContent = new XDocument(new XElement("name", "World")).ToString(); 1292var requestContent = new XDocument(new XElement("name", "World")).ToString(); 1322var requestContent = new XDocument(new XElement("name", "World")).ToString();
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
XmlAssert.cs (1)
57return new XDocument(
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
src\Mvc\Mvc.Formatters.Xml\test\XmlAssert.cs (1)
57return new XDocument(
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)
333document = new XDocument(
Microsoft.Cci.Extensions (1)
Dgml\DgmlExtensions.cs (1)
30var xDocument = new XDocument();
Microsoft.CodeAnalysis (1)
InternalUtilities\XmlUtilities.cs (1)
24copy = new XDocument(((XDocument)(object)node));
Microsoft.CodeAnalysis.Test.Utilities (2)
Win32Res.cs (2)
90var doc = new XDocument(); 173var doc = new XDocument();
Microsoft.CodeAnalysis.Workspaces (1)
Shared\Extensions\ISymbolExtensions.cs (1)
570copy = new XDocument(((XDocument)(object)node));
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\XmlUtilities.cs (1)
24copy = new XDocument(((XDocument)(object)node));
Microsoft.DotNet.PackageTesting (1)
VerifyClosure.cs (1)
346var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.SharedFramework.Sdk (1)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
346var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.XliffTasks (1)
Model\XlfDocument.cs (1)
48_document = new XDocument(
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
TestAssembly.cs (1)
32var manifest = new XDocument(
Microsoft.NET.Build.Tasks (2)
GenerateToolsSettingsFile.cs (1)
102return new XDocument(
WriteAppConfigWithSupportedRuntime.cs (1)
153new XDocument(
Microsoft.NET.Build.Tasks.UnitTests (7)
GivenWriteAppConfigWithSupportedRuntimeTask.cs (7)
18new XDocument( 34new XDocument( 50new XDocument( 81new XDocument( 113new XDocument( 138new XDocument( 164new XDocument(
Microsoft.NET.Build.Tests (2)
GivenThatWeWantToBuildADesktopExe.cs (2)
836var appconfigWithoutSupportedRuntime = new XDocument( 860var appconfigWithoutSupportedRuntime = new XDocument(
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.Publish.Tasks.Tests (5)
WebConfigTransformTests.cs (5)
200new object[] {new XDocument(WebConfigTransformTemplates.WebConfigTemplateWithoutLocation) }, 201new object[] {new XDocument(WebConfigTransformTemplates.WebConfigTemplateWithNonRelevantLocationFirst) }, 202new object[] {new XDocument(WebConfigTransformTemplates.WebConfigTemplateWithNonRelevantLocationLast) }, 203new object[] {new XDocument(WebConfigTransformTemplates.WebConfigTemplateWithRelevantLocationFirst) }, 204new object[] {new XDocument(WebConfigTransformTemplates.WebConfigTemplateWithRelevantLocationLast) },
Microsoft.NET.Sdk.StaticWebAssets.Tasks (5)
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
62var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
GenerateStaticWebAssetsPropsFile.cs (1)
93var 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)
24var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Microsoft.NET.TestFramework (2)
Commands\GetValuesCommand.cs (1)
104var customAfterDirectoryBuildTargets = new XDocument(new XElement(ns + "Project"));
ProjectConstruction\TestProject.cs (1)
379var customAfterDirectoryBuildTargets = new XDocument(new XElement(ns + "Project"));
Microsoft.VisualStudio.LanguageServices (1)
Snippets\SnippetExpansionClient.cs (1)
683return new XDocument(
System.Private.Xml.Linq (2)
System\Xml\Linq\XDocument.cs (2)
482XDocument d = new XDocument(); 867return new XDocument(this);
XmlFileLogger (1)
ObjectModel\Build.cs (1)
46var document = new XDocument();
810 references to XDocument
aspire (10)
Packaging\NuGetConfigMerger.cs (8)
14public required XDocument Document { get; init; } 156XDocument doc; 159doc = XDocument.Load(stream); 798private static async Task SaveConfigAsync(FileInfo nugetConfigFile, XDocument document) 837var doc = XDocument.Load(stream); 943XDocument doc; 946doc = XDocument.Load(stream);
Projects\FallbackProjectParser.cs (2)
34var doc = XDocument.Load(projectFile.FullName);
Aspire.Cli.Tests (28)
Packaging\NuGetConfigMergerSnapshotTests.cs (10)
86var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 148var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 209var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 268var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 332var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
Packaging\NuGetConfigMergerTests.cs (16)
92var xml = XDocument.Load(targetConfigPath); 133var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 172var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 212var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 322var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 372var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 441var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 507var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
Packaging\PackagingServiceTests.cs (2)
223var doc = XDocument.Load(nugetConfigPath);
Aspire.Dashboard (2)
Model\TextVisualizerViewModel.cs (2)
58var document = XDocument.Parse(text.Trim());
BuildBoss (4)
ProjectData.cs (1)
17internal XDocument Document => ProjectUtil.Document;
ProjectUtil.cs (3)
20internal XDocument Document { get; } 30: this(new ProjectKey(filePath), XDocument.Load(filePath)) 34internal ProjectUtil(ProjectKey key, XDocument document)
ConfigurationSchemaGenerator (2)
ConfigSchemaEmitter.cs (2)
436var doc = XDocument.Parse(docComment);
dotnet.Tests (5)
CommandTests\Pack\PackTests.cs (2)
225var nuspecXml = XDocument.Parse(manifestReader.ReadToEnd());
CommandTests\Package\List\GivenDotnetListPackage.cs (1)
97static void ChangeTargetFrameworkTo2_1(XDocument project)
GivenThatWeWantToBeBackwardsCompatibleWith1xProjects.cs (2)
87var projectXml = XDocument.Load(projectFile);
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\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (2)
18var projectDocument = XDocument.Load(projectPath, LoadOptions.PreserveWhitespace);
dotnet-user-secrets (2)
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (2)
18var projectDocument = XDocument.Load(projectPath, LoadOptions.PreserveWhitespace);
EndToEnd.Tests (20)
GivenSelfContainedAppsRollForward.cs (4)
26var project = XDocument.Load(projectPath); 53var project = XDocument.Load(projectPath);
GivenUsingDefaultRuntimeFrameworkVersions.cs (2)
30var project = XDocument.Load(projectFile);
GivenWeWantToRequireWindowsForDesktopApps.cs (1)
47static void overrideLastRuntimeFrameworkVersionToExistingOlderVersion(XDocument project)
GivenWindowsApp.cs (2)
29var project = XDocument.Load(projectPath);
ProjectBuildTests.cs (9)
25var project = XDocument.Load(projectPath); 67var project = XDocument.Load(projectPath); 421XDocument GetProjectXml() 431XDocument projectXml = XDocument.Load(projectFile); 438var projectXml = GetProjectXml(); 449var projectXml = GetProjectXml();
Utilities\TestProjectCreator.cs (2)
39var project = XDocument.Load(projectPath);
IIS.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
151var xDocument = XDocument.Load(xmlFile).Root;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
100var document = XDocument.Load(webConfigPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (2)
74XDocument ancmConfig; 78ancmConfig = XDocument.Load(ancmConfigPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (2)
102XDocument webConfig = XDocument.Load(webConfigLocation);
IIS.LongTests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
100var document = XDocument.Load(webConfigPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (2)
74XDocument ancmConfig; 78ancmConfig = XDocument.Load(ancmConfigPath);
IIS.NewHandler.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
100var document = XDocument.Load(webConfigPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (2)
74XDocument ancmConfig; 78ancmConfig = XDocument.Load(ancmConfigPath);
IIS.NewShim.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
100var document = XDocument.Load(webConfigPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (2)
74XDocument ancmConfig; 78ancmConfig = XDocument.Load(ancmConfigPath);
IIS.ShadowCopy.Tests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
100var document = XDocument.Load(webConfigPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (2)
74XDocument ancmConfig; 78ancmConfig = XDocument.Load(ancmConfigPath);
IIS.Tests (2)
Utilities\TestServer.cs (2)
125var webHostConfig = XDocument.Load(Path.GetFullPath("HostableWebCore.config"));
IISExpress.FunctionalTests (5)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
151var xDocument = XDocument.Load(xmlFile).Root;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (2)
100var document = XDocument.Load(webConfigPath);
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (2)
102XDocument webConfig = XDocument.Load(webConfigLocation);
illink (2)
ILLink.Tasks (3)
CombineLinkerXmlFiles.cs (3)
33XDocument subFile = XDocument.Load(linkerXmlFile.ItemSpec); 41var xdoc = new XDocument(combined);
Metrics (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Metrics.Legacy (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.Arcade.Common (2)
NupkgInfoFactory.cs (2)
53XDocument doc = XDocument.Load(nuspecFileStream, LoadOptions.PreserveWhitespace);
Microsoft.AspNetCore.App.UnitTests (10)
SharedFxTests.cs (4)
268var runtimeListDoc = XDocument.Load(runtimeListPath); 321var runtimeListDoc = XDocument.Load(runtimeListPath);
TargetingPackTests.cs (6)
316var frameworkListDoc = XDocument.Load(frameworkListPath); 379var frameworkListDoc = XDocument.Load(frameworkListPath); 421var frameworkListDoc = XDocument.Load(frameworkListPath);
Microsoft.AspNetCore.Authentication.Test (4)
OpenIdConnect\TestSettings.cs (4)
53var xdoc = XDocument.Parse(responseBody.Replace("doctype", "DOCTYPE")); 91var xdoc = XDocument.Parse(transaction.ResponseText.Replace("doctype", "DOCTYPE"));
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.Grpc.JsonTranscoding.Tests (8)
ServerStreamingServerCallHandlerTests.cs (4)
249var responseXml1 = XDocument.Parse(line1!); 256var responseXml2 = XDocument.Parse(line2!);
UnaryServerCallHandlerTests.cs (4)
1128var responseXml = XDocument.Load(new MemoryStream(requestData)); 1368var responseXml = XDocument.Load(httpContext.Response.Body);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (6)
XmlAssert.cs (6)
21var sortedExpectedXDocument = SortAttributes(XDocument.Parse(expectedXml)); 22var sortedActualXDocument = SortAttributes(XDocument.Parse(actualXml)); 55private static XDocument SortAttributes(XDocument document)
Microsoft.AspNetCore.Mvc.FunctionalTests (12)
AsyncEnumerableTestBase.cs (2)
87var xml = XDocument.Parse(content);
src\Mvc\Mvc.Formatters.Xml\test\XmlAssert.cs (6)
21var sortedExpectedXDocument = SortAttributes(XDocument.Parse(expectedXml)); 22var sortedActualXDocument = SortAttributes(XDocument.Parse(actualXml)); 55private static XDocument SortAttributes(XDocument document)
XmlDataContractSerializerFormattersWrappingTest.cs (2)
237var root = XDocument.Parse(content).Root; 279var root = XDocument.Parse(content).Root;
XmlSerializerFormattersWrappingTest.cs (2)
220var root = XDocument.Parse(content).Root; 262var root = XDocument.Parse(content).Root;
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.Rewrite.Tests (2)
IISUrlRewrite\RewriteMapParserTests.cs (2)
27var xmlDoc = XDocument.Load(new StringReader(xml), 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.AspNetCore.Server.IntegrationTesting.IIS (8)
IISDeployer.cs (2)
311var config = XDocument.Parse(DeploymentParameters.ServerConfigTemplateContent ?? File.ReadAllText("IIS.config"));
IISDeployerBase.cs (4)
25var document = XDocument.Load(ApplicationHostConfigPath); 44var webconfig = XDocument.Load(path);
IISExpressDeployer.cs (2)
286XDocument config = XDocument.Parse(serverConfig);
Microsoft.Build.BuildCheck.UnitTests (2)
TestAssemblyInfo.cs (2)
124XDocument doc = null; 128doc = XDocument.Load(xr);
Microsoft.Build.CommandLine.UnitTests (2)
TestAssemblyInfo.cs (2)
124XDocument doc = null; 128doc = XDocument.Load(xr);
Microsoft.Build.Engine.OM.UnitTests (2)
TestAssemblyInfo.cs (2)
124XDocument doc = null; 128doc = XDocument.Load(xr);
Microsoft.Build.Engine.UnitTests (2)
TestAssemblyInfo.cs (2)
124XDocument doc = null; 128doc = XDocument.Load(xr);
Microsoft.Build.Framework.UnitTests (2)
TestAssemblyInfo.cs (2)
124XDocument doc = null; 128doc = XDocument.Load(xr);
Microsoft.Build.Tasks.Core (11)
AssemblyDependency\GenerateBindingRedirects.cs (5)
66var doc = LoadAppConfig(AppConfigFile); 114var outputDoc = LoadAppConfig(OutputAppConfigFile); 328private XDocument LoadAppConfig(ITaskItem appConfigItem) 330XDocument document; 342document = XDocument.Load(xr);
GenerateResource.cs (2)
3055XDocument doc = XDocument.Load(xmlReader, LoadOptions.PreserveWhitespace);
ResourceHandling\MSBuildResXReader.cs (2)
32XDocument doc = XDocument.Load(xmlReader, LoadOptions.PreserveWhitespace);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (2)
315XDocument document; 321document = XDocument.Parse($"<Task>{taskBody}</Task>");
Microsoft.Build.Tasks.UnitTests (2)
TestAssemblyInfo.cs (2)
124XDocument doc = null; 128doc = XDocument.Load(xr);
Microsoft.Build.Utilities.UnitTests (2)
TestAssemblyInfo.cs (2)
124XDocument doc = null; 128doc = XDocument.Load(xr);
Microsoft.Cci.Extensions (2)
Dgml\DgmlExtensions.cs (2)
13public static XDocument GetDgmlDependencyGraph(this IEnumerable<IAssembly> assemblies) 30var xDocument = new XDocument();
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\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
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.CSharp.Symbol.UnitTests (4)
DocumentationComments\CrefTests.cs (4)
6887var xml = System.Xml.Linq.XDocument.Parse(xmlDocumentationString); 6911var xml = System.Xml.Linq.XDocument.Parse(xmlDocumentationString);
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (4)
65var document = XDocument.Load(filePath); 73private static ImmutableArray<XElement>? ReadCodeSnippetElements(XDocument document) 110internal static ImmutableArray<CodeSnippet>? ReadSnippets(XDocument document)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
InlineCompletions\TestSnippetInfoService.cs (2)
34var testSnippetsXml = XDocument.Load(snippetsFile);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
AbstractResxGenerator.cs (1)
401foreach (var node in XDocument.Load(new SourceTextReader(text)).Descendants("data"))
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.SemanticSearch.Extensions (2)
ProjectModel.cs (2)
117var newDocument = XDocument.Load(FilePath, LoadOptions.None);
Microsoft.CodeAnalysis.Test.Utilities (2)
Win32Res.cs (2)
90var doc = new XDocument(); 173var doc = new XDocument();
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 (3)
Shared\Extensions\ISymbolExtensions.cs (3)
391var document = XDocument.Parse(inheritedDocumentation.FullXmlFragment, LoadOptions.PreserveWhitespace); 570copy = new XDocument(((XDocument)(object)node));
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\BuildHostProcessManager.cs (2)
361XDocument document; 370document = XDocument.Load(xmlReader);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\XmlUtilities.cs (1)
24copy = new XDocument(((XDocument)(object)node));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
SolutionGeneration.cs (2)
268var document = XDocument.Parse(CSharpProjectTemplate);
VisualStudioMSBuildWorkspaceTests.cs (2)
2480var document = XDocument.Parse(projectFileText);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
UtilityTest\XmlDocumentationProviderTests.cs (2)
43var xmlDocument = XDocument.Parse(xml);
Microsoft.DotNet.Arcade.Sdk (3)
src\ExtractNgenMethodList.cs (2)
53var document = XDocument.Load(IbcXmlFilePath);
src\GenerateResxSource.cs (1)
106foreach (var node in XDocument.Load(ResourceFile).Descendants("data"))
Microsoft.DotNet.Arcade.Sdk.Tests (1)
GenerateSourcePackageSourceLinkTargetsFileTests.cs (1)
54XDocument.Load(new StringReader(content));
Microsoft.DotNet.Build.Tasks.Installers (12)
src\CreateWixBuildWixpack.cs (5)
219IngestDefineVariablesFromString(XDocument.Load(file).ToString()); 243XDocument xmlDocument = XDocument.Load(file); 534var doc = XDocument.Load(copiedXmlPath);
src\CreateWixCommandPackageDropBase.cs (3)
192XDocument doc = XDocument.Load(wixObjFilePath); 243private void ProcessXPath(XDocument doc, string xpath, string outputPath, XmlNamespaceManager nsmgr, int pathField1, int pathField2 = 0)
src\GenerateMacOSDistributionFile.cs (2)
39XDocument document = XDocument.Load(TemplatePath);
src\StabilizeWixFileId.cs (2)
52XDocument content = XDocument.Load(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)
52var document = XDocument.Load(stream); 77internal void UpdateInstallationElement(XDocument document)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (8)
Vsix\FinalizeInsertionVsixFile.cs (8)
29var manifestXml = XDocument.Load(new StringReader(manifest)); 56var manifestXml = XDocument.Load(new StringReader(manifest)); 80var manifestXml = XDocument.Load(new StringReader(manifest)); 110var manifestXml = XDocument.Load(new StringReader(manifest));
Microsoft.DotNet.Build.Tasks.Workloads (8)
Msi\MsiPayloadPackageProject.wix.cs (2)
57var proj = XDocument.Load(msiCsproj);
Msi\WorkloadPackGroupMsi.wix.cs (6)
84var directoriesDoc = XDocument.Load(directoriesWxsPath); 92var productDoc = XDocument.Load(productWxsPath); 100var registryDoc = XDocument.Load(registryWxsPath);
Microsoft.DotNet.NuGetRepack.Tasks (6)
src\NuGetVersionUpdater.cs (4)
32public XDocument SpecificationXml { get; } 42XDocument specificationXml, 123XDocument nuspecXml = null; 138nuspecXml = XDocument.Load(nuspecStream);
src\ReplacePackageParts.cs (2)
144var nuspecXml = XDocument.Load(nuspecStream);
Microsoft.DotNet.NuGetRepack.Tests (1)
VersionUpdaterTests.cs (1)
47XDocument.Load(new MemoryStream(actualParts[i].blob));
Microsoft.DotNet.PackageInstall.Tests (2)
EndToEndToolTests.cs (2)
498var xml = XDocument.Load(stream, LoadOptions.None);
Microsoft.DotNet.PackageTesting (1)
VerifyClosure.cs (1)
346var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.SetupNugetSources.Tests (17)
FeedEnablingTests.cs (1)
204Action parseXml = () => System.Xml.Linq.XDocument.Parse(modifiedConfig);
NuGetConfigAssertions.cs (16)
32var doc = XDocument.Parse(configContent); 50var doc = XDocument.Parse(configContent); 65var doc = XDocument.Parse(configContent); 88var doc = XDocument.Parse(configContent); 103var doc = XDocument.Parse(configContent); 118var doc = XDocument.Parse(configContent); 131var doc = XDocument.Parse(configContent); 141var doc = XDocument.Parse(xmlContent);
Microsoft.DotNet.SharedFramework.Sdk (1)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
346var doc = new XDocument(new XElement(s_dgmlns + "DirectedGraph"));
Microsoft.DotNet.SignTool.Tests (2)
FakeBuildEngine.cs (2)
42var xml = XDocument.Load(projectFileName);
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)
28private XDocument _document; 40_document = XDocument.Load(reader);
Tasks\TransformTemplates.cs (2)
66XDocument templateXml = XDocument.Load(templatePath);
Microsoft.Extensions.FileProviders.Embedded (2)
Manifest\ManifestParser.cs (2)
36var document = XDocument.Load(stream);
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
TestAssembly.cs (1)
32var manifest = new XDocument(
Microsoft.Extensions.SecretManager.Tools.Tests (6)
InitCommandTest.cs (6)
96var projectDocument = XDocument.Load(projectFile); 105var projectDocumentWithoutSecret = XDocument.Load(projectFile, LoadOptions.PreserveWhitespace); 110var projectDocumentWithSecret = XDocument.Load(projectFile, LoadOptions.PreserveWhitespace);
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)
FrameworkListReader.cs (2)
65var frameworkList = XDocument.Load(frameworkListPath);
Microsoft.NET.Build.Tasks (15)
FrameworkListReader.cs (2)
65var frameworkList = XDocument.Load(frameworkListPath);
GenerateToolsSettingsFile.cs (1)
37internal static XDocument GenerateDocument(string entryPointRelativePath, string commandName, string commandRunner, string runtimeIdentifier,
ResolveRuntimePackAssets.cs (2)
166XDocument frameworkListDoc = XDocument.Load(runtimeListPath);
ResolveTargetingPackAssets.cs (3)
316XDocument frameworkListDoc = XDocument.Load(definition.FrameworkListPath); 414XDocument frameworkListDoc)
StoreArtifactParser.cs (2)
19var doc = XDocument.Load(filterFile);
WriteAppConfigWithSupportedRuntime.cs (5)
33XDocument doc = LoadAppConfig(AppConfigFile); 50XDocument doc, 147private XDocument LoadAppConfig(ITaskItem appConfigItem) 149XDocument document; 159document = XDocument.Load(appConfigItem.ItemSpec);
Microsoft.NET.Build.Tasks.UnitTests (10)
GivenAGenerateToolsSettingsFile.cs (1)
14private XDocument _generatedDocument = null;
GivenThatWeHaveErrorCodes.cs (2)
97var doc = XDocument.Load("Strings.resx");
GivenWriteAppConfigWithSupportedRuntimeTask.cs (7)
17var doc = 33var doc = 49var doc = 80var doc = 112var doc = 137var doc = 163var doc =
Microsoft.NET.Build.Tests (32)
DepsFileSkipTests.cs (1)
199private void AddSkipTarget(XDocument project, string filenameToSkip)
DesignTimeBuildTests.cs (3)
186private void TestDesignTimeBuildAfterChange(Action<XDocument> projectChange, [CallerMemberName] string callingMethod = "") 233var project = XDocument.Load(projectFilePath);
GivenFrameworkReferences.cs (2)
1069Action<XDocument> projectChanges = null, 1142Action<XDocument> projectChanges = null,
GivenThatWeWantAllResourcesInSatellite.cs (1)
25Action<XDocument> projectChanges = null,
GivenThatWeWantToBuildACppCliProject.cs (4)
191private void ChangeTargetFramework(string projectPath, XDocument project, string targetFramework) 203private void ConfigureProject(string projectPath, XDocument project, string targetFramework, string[] properties) 210private void AddBuildProperty(string projectPath, XDocument project, string property, string value) 219private void RecordProperties(string projectPath, XDocument project, string[] properties)
GivenThatWeWantToBuildADesktopExe.cs (2)
836var appconfigWithoutSupportedRuntime = new XDocument( 860var appconfigWithoutSupportedRuntime = new XDocument(
GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs (1)
28private void AddReferenceToLibrary(XDocument project, ReferenceScenario scenario)
GivenThatWeWantToBuildALibrary.cs (1)
72Action<XDocument> projectChanges = null,
GivenThatWeWantToBuildALibraryWithFSharp.cs (1)
66Action<XDocument> projectChanges = null)
GivenThatWeWantToBuildALibraryWithVB.cs (1)
77Action<XDocument> projectChanges = null)
GivenThatWeWantToBuildAWindowsDesktopProject.cs (4)
158var project = XDocument.Load(projFile); 264var project = XDocument.Load(projectPath);
GivenThatWeWantToCopyPPFileToOutput.cs (1)
63private void AddContent(XDocument package)
GivenThatWeWantToReferenceAProject.cs (1)
207private void AddProjectChanges(XDocument project, string childPath = null)
GivenThereAreDefaultItems.cs (9)
65Action<XDocument> projectChanges = project => 105Action<XDocument> projectChanges = project => 149Action<XDocument> projectChanges = project => 185Action<XDocument> projectChanges = project => 222Action<XDocument> projectChanges = project => 258Action<XDocument> projectChanges = project => 308Action<XDocument> projectChanges = project => 443Action<XDocument> projectChanges = project => 490Action<XDocument> projectChanges = project =>
Microsoft.NET.Pack.Tests (14)
GivenThatThereAreImplicitPackageReferences.cs (5)
232private List<XElement> GetDependencyGroups(XDocument nuspec, out XNamespace ns) 245private List<XElement> GetFrameworkAssemblies(XDocument nuspec, out XNamespace ns) 256private XDocument PackAndGetNuspec(TestProject testProject, string identifier = null) 267var nuspec = XDocument.Load(nuspecPath);
GivenThatWeWantToPackACppCliProject.cs (2)
30private void AddPackageReference(string projectPath, XDocument project, string package, string version) 41private void AddBuildProperty(string projectPath, XDocument project, string property, string value)
GivenThatWeWantToPackAHelloWorldProject.cs (2)
33var nuspec = XDocument.Load(nuspecPath);
GivenThatWeWantToPackANetFrameworkLibrary.cs (5)
26var nuspec = XDocument.Load(nuspecPath); 57var nuspec = XDocument.Load(nuspecPath); 70private string PackAndGetNuspecPath(TestProject testProject, string identifier = null, Action<XDocument> xmlAction = null)
Microsoft.NET.Publish.Tests (22)
GivenThatWeWantToPublishAnAotApp.cs (3)
543private void OverrideKnownILCompilerPackRuntimeIdentifiers(XDocument project, string runtimeIdentifiers) 1023private void SetMetadata(XDocument project, string assemblyName, string key, string value) 1267private void AddRuntimeConfigOption(XDocument project)
GivenThatWeWantToPublishASingleFileApp.cs (4)
50private PublishCommand GetPublishCommand(string identifier = null, [CallerMemberName] string callingMethod = "", Action<XDocument> projectChanges = null) 140var projectChanges = (XDocument doc) => 1039static void VerifyPrepareForBundle(XDocument project) 1089static void VerifyPrepareForBundle(XDocument project)
GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs (4)
126var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")); 198var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj"));
GivenThatWeWantToRunILLink.cs (7)
1871public static void AddRootDescriptor(XDocument project, string rootDescriptorFileName) 1881public static void RemoveRootDescriptor(XDocument project) 1890public static void SetMetadata(XDocument project, string assemblyName, string key, string value) 1912public static void SetGlobalTrimMode(XDocument project, string trimMode) 1922public static void SetTrimmerDefaultAction(XDocument project, string action) 1931public static void EnableNonFrameworkTrimming(XDocument project) 1976public static void AddRuntimeConfigOption(XDocument project, bool trim)
GivenThatWeWantToStoreAProjectWithDependencies.cs (1)
343from element in XDocument.Load(path).Root.Elements("Package")
PublishTestUtils.cs (1)
116public static void AddTargetFrameworkAliases(XDocument project)
PublishWpfApp.cs (2)
26var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj"));
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.Publish.Tasks.Tests (96)
Tasks\GenerateEnvTransformTests.cs (19)
12private XDocument _environmentTransformWithLocationTemplate => XDocument.Parse( 24private XDocument _environmentTransformWithoutLocationTemplate => XDocument.Parse( 56XDocument transformDoc = env.GenerateEnvTransformDocument(null, null); 117IList<XDocument> templateDocumentList = new List<XDocument>() { _environmentTransformWithLocationTemplate, _environmentTransformWithoutLocationTemplate }; 119foreach (var template in templateDocumentList) 122XDocument envDoc = env.GenerateEnvTransformDocument(template, envVariables); 149List<XDocument> locationWebConfigTemplateList = new() { WebConfigTransformTemplates.WebConfigTemplate }; 150foreach (var locationWebConfigTemplate in locationWebConfigTemplateList) 154XDocument webConfigTemplate = locationWebConfigTemplate; 185Assert.Equal(expected, XDocument.Parse(File.ReadAllText(webConfigPath)).Root.Descendants("environmentVariable").Count()); 216XDocument webConfigTemplate = WebConfigTransformTemplates.WebConfigTemplateWithEnvironmentVariable; 247Assert.Equal(expected + 1, XDocument.Parse(File.ReadAllText(webConfigPath)).Root.Descendants("environmentVariable").Count()); 275List<XDocument> locationWebConfigTemplateList = new() {WebConfigTransformTemplates.WebConfigTemplateWithoutLocation, 280foreach (var locationWebConfigTemplate in locationWebConfigTemplateList) 284XDocument webConfigTemplate = locationWebConfigTemplate; 315Assert.Equal(expected, XDocument.Parse(File.ReadAllText(webConfigPath)).Root.Descendants("environmentVariable").Count());
Tasks\TransformXmlTests.cs (12)
10private XDocument _webConfigTemplate => XDocument.Parse( 24private XDocument _webConfigTransformRemoveAll => XDocument.Parse( 35private XDocument _webConfigTransformAdd => XDocument.Parse( 78Assert.True(XDocument.Parse(File.ReadAllText(sourceFile)).Descendants("handlers").Count() == 1); 79Assert.True(XDocument.Parse(File.ReadAllText(sourceFile)).Descendants("aspNetCore").Count() == 1); 81Assert.True(XDocument.Parse(File.ReadAllText(outputFile)).Descendants("handlers").Count() == 0); 82Assert.True(XDocument.Parse(File.ReadAllText(outputFile)).Descendants("aspNetCore").Count() == 0); 123Assert.True(XDocument.Parse(File.ReadAllText(sourceFile)).Descendants("environmentVariable").Count() == 0); 124Assert.True(XDocument.Parse(File.ReadAllText(outputFile)).Descendants("environmentVariable").Count() == 1);
WebConfigTelemetryTests.cs (2)
18XDocument transformedWebConfig = WebConfigTransform.Transform(null, "test.exe", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 22XDocument output = WebConfigTelemetry.AddTelemetry(transformedWebConfig, projectGuid, true, null, null);
WebConfigTransformTemplates.cs (20)
8public static XDocument WebConfigTemplate => XDocument.Parse( 20public static XDocument WebConfigTemplateWithOutExe => XDocument.Parse( 32public static XDocument WebConfigTemplatePortable => XDocument.Parse( 44public static XDocument WebConfigTemplateWithProjectGuid => XDocument.Parse( 57public static XDocument WebConfigTemplateWithEnvironmentVariable => XDocument.Parse( 73public static XDocument WebConfigTemplateWithoutLocation => XDocument.Parse( 83public static XDocument WebConfigTemplateWithNonRelevantLocationFirst => XDocument.Parse( 107public static XDocument WebConfigTemplateWithNonRelevantLocationLast => XDocument.Parse( 131public static XDocument WebConfigTemplateWithRelevantLocationFirst => XDocument.Parse( 156public static XDocument WebConfigTemplateWithRelevantLocationLast => XDocument.Parse(
WebConfigTransformTests.cs (43)
39WebConfigTransform.Transform(XDocument.Parse("<unexpected />"), "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null))); 52var input = WebConfigTransformTemplates.WebConfigTemplate; 73var input = WebConfigTransformTemplates.WebConfigTemplate; 76var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 88var input = WebConfigTransformTemplates.WebConfigTemplate; 101var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: "foo", environmentName: null, projectFullPath: projectPath); 110var output = WebConfigTransform.Transform(null, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: attributeValue, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 120var output = WebConfigTransform.Transform(WebConfigTransformTemplates.WebConfigTemplate, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: attributeValue, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 130var input = WebConfigTransformTemplates.WebConfigTemplate; 132var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: attributeValue, environmentName: null, projectFullPath: null); 142var input = WebConfigTransformTemplates.WebConfigTemplate; 156var output = WebConfigTransform.Transform(null, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: aspNetCoreModuleName, aspNetCoreHostingModel: attributeValue, environmentName: null, projectFullPath: null); 164var input = WebConfigTransformTemplates.WebConfigTemplate; 173var input = WebConfigTransformTemplates.WebConfigTemplate; 175var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: attributeValue, environmentName: null, projectFullPath: null); 182var input = WebConfigTransformTemplates.WebConfigTemplate; 184var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: "Production", projectFullPath: null); 191var input = WebConfigTransformTemplates.WebConfigTemplateWithEnvironmentVariable; 193var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: "Staging", projectFullPath: null); 214public void WebConfigTransform_HandlesLocations_Correctly(XDocument template) 216var input = template; 218var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 236var input = WebConfigTransformTemplates.WebConfigTemplate; 249var input = WebConfigTransformTemplates.WebConfigTemplate; 256var output = WebConfigTransform.Transform(input, "app.exe", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: "Test", projectFullPath: null); 264var input = WebConfigTransformTemplates.WebConfigTemplate; 279var input = WebConfigTransformTemplates.WebConfigTemplate; 300var input = WebConfigTransformTemplates.WebConfigTemplate; 319var input = WebConfigTransformTemplates.WebConfigTemplate; 327XDocument.Parse(@"<aspNetCore processPath="".\test.exe"" stdoutLogEnabled=""false"" 335var input = WebConfigTransformTemplates.WebConfigTemplate; 336var output = WebConfigTransform.Transform(input, "test.dll", configureForAzure: true, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 351XDocument.Parse(@"<aspNetCore processPath=""dotnet"" arguments="".\test.dll"" stdoutLogEnabled=""false"" 364XDocument.Parse(@"<aspNetCore processPath="".\test.exe"" stdoutLogEnabled=""false"" 390var input = WebConfigTransformTemplates.WebConfigTemplate; 416var input = WebConfigTransformTemplates.WebConfigTemplate; 429var input = WebConfigTransformTemplates.WebConfigTemplate; 450XDocument transformedWebConfig = WebConfigTransform.Transform(null, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 454XDocument transformedWebConfigWithGuid = WebConfigTransform.AddProjectGuidToWebConfig(transformedWebConfig, projectGuid, false); 471XDocument transformedWebConfig = WebConfigTransform.Transform(null, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 473XDocument transformedWebConfigWithGuid = WebConfigTransform.AddProjectGuidToWebConfig(transformedWebConfig, projectGuid, false); 488XDocument transformedWebConfig = WebConfigTransform.Transform(null, "test.dll", configureForAzure: false, useAppHost: true, extension: ".exe", aspNetCoreModuleName: null, aspNetCoreHostingModel: null, environmentName: null, projectFullPath: null); 492XDocument transformedWebConfigWithGuid = WebConfigTransform.AddProjectGuidToWebConfig(transformedWebConfig, null, false);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
62var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
GenerateStaticWebAssetsPropsFile.cs (1)
93var 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)
24var document = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
Microsoft.NET.Sdk.StaticWebAssets.Tests (31)
StaticWebAssetEndpointsIntegrationTest.cs (1)
305var doc2 = document;
StaticWebAssetsPackIntegrationTest.cs (30)
404var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 473var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 541var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 615var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 688var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 757var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 825var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 892var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 958var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 1030var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 1101var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 1168var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 1234var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 1309var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor""> 1386var parse = XDocument.Parse($@"<Project Sdk=""Microsoft.NET.Sdk.Razor"">
Microsoft.NET.TestFramework (26)
Commands\GetValuesCommand.cs (3)
68var project = XDocument.Load(ProjectFile); 104var customAfterDirectoryBuildTargets = new XDocument(new XElement(ns + "Project"));
OutputPathCalculator.cs (4)
87var project = XDocument.Load(projectPath); 128var dbp = XDocument.Load(directoryBuildPropsFile);
ProjectConstruction\TestProject.cs (5)
82public List<Action<XDocument>> ProjectChanges { get; } = new List<Action<XDocument>>(); 160var projectXml = XDocument.Load(sourceProject); 379var customAfterDirectoryBuildTargets = new XDocument(new XElement(ns + "Project"));
TestAsset.cs (9)
230private TestAsset WithProjectChanges(Action<XDocument> actionOnProject, string? projectName = null) 250public TestAsset WithProjectChanges(Action<XDocument> xmlAction) 255public TestAsset WithProjectChanges(Action<string, XDocument> xmlAction) 263var project = XDocument.Load(projectFile); 293XDocument doc = XDocument.Load(propsFilePath); 305XDocument csprojDoc = XDocument.Load(projectPath);
TestCommandLine.cs (2)
153var testConfig = XDocument.Load(testConfigFile);
Utilities\ProjectModification.cs (3)
8public static void AddDisplayMessageToProject(XDocument project, string beforeTargets) 24public static void AddDisplayMessageBeforeVsTestToProject(XDocument project) 29public static void AddDisplayMessageBeforeRestoreToProject(XDocument project)
Microsoft.NET.ToolPack.Tests (4)
GivenThatWeWantToPackAToolProject.cs (1)
113XElement command = XDocument.Load(copiedFile)
GivenThatWeWantToPackAToolProjectWithComplexNugetDependency.cs (1)
61private static void ChangeToPackageThatDependsOnOtherPackage(XDocument project)
GivenThatWeWantToPackAToolProjectWithExplicitConfig.cs (2)
43XDocument.Load(copiedFile) 78XDocument.Load(copiedFile)
Microsoft.VisualStudio.LanguageServices (3)
Snippets\SnippetExpansionClient.cs (3)
553var snippet = CreateMethodCallSnippet(methodName, includeMethod: true, [], ImmutableDictionary<string, string>.Empty); 631private static XDocument CreateMethodCallSnippet(string methodName, bool includeMethod, ImmutableArray<IParameterSymbol> parameters, ImmutableDictionary<string, string> parameterValues) 922var snippet = CreateMethodCallSnippet(method.Name, includeMethod: false, method.Parameters, newArguments);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (2)
1394XDocument xmlDocument; 1398xmlDocument = XDocument.Load(reader);
Microsoft.VisualStudio.LanguageServices.Implementation (4)
SolutionExplorer\DiagnosticItem\DiagnosticItem.cs (2)
55var ruleSetDocument = XDocument.Load(pathToRuleSet);
SolutionExplorer\RuleSetDocumentExtensions.cs (2)
14internal static void SetSeverity(this XDocument ruleSet, string analyzerId, string ruleId, ReportDiagnostic value) 94private static XElement FindOrCreateRulesElement(XDocument ruleSetDocument, string analyzerID)
netstandard (1)
netstandard.cs (1)
2271[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XDocument))]
Roslyn.Diagnostics.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
RulesetToEditorconfigConverter (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
sdk-tasks (6)
GetDependencyInfo.cs (2)
30XDocument document = XDocument.Load(VersionDetailsXmlFile);
OverrideAndCreateBundledNETCoreAppPackageVersion.cs (4)
31var stage0Doc = XDocument.Load(Stage0BundledVersionsPath); 32var stage2Doc = XDocument.Load(Stage2BundledVersionsPath);
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; 1297if (this is XDocument) 1330if (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); 436/// Create a new <see cref="XDocument"/> containing the contents of the 441/// <see cref="XDocument"/>. 450/// A new <see cref="XDocument"/> containing the contents of the passed 453public static Task<XDocument> LoadAsync(XmlReader reader, LoadOptions options, CancellationToken cancellationToken) 458return Task.FromCanceled<XDocument>(cancellationToken); 462private static async Task<XDocument> LoadAsyncInternal(XmlReader reader, LoadOptions options, CancellationToken cancellationToken) 469XDocument d = InitLoad(reader, options); 480private static XDocument InitLoad(XmlReader reader, LoadOptions options) 482XDocument d = new XDocument(); 507/// Create a new <see cref="XDocument"/> from a string containing 511/// Create a new <see cref="XDocument"/> from a string containing 518/// An <see cref="XDocument"/> containing an XML tree initialized from the 521public static XDocument Parse(string text) 527/// Create a new <see cref="XDocument"/> from a string containing 545/// An <see cref="XDocument"/> containing an XML tree initialized from the 548public static XDocument Parse(string text, LoadOptions options) 561/// Output this <see cref="XDocument"/> to the passed in <see cref="Stream"/>. 566/// <see cref="XDocument.Save(Stream, SaveOptions)"/>) enabling 572/// The <see cref="Stream"/> to output this <see cref="XDocument"/> to. 580/// Output this <see cref="XDocument"/> to a <see cref="Stream"/>. 609/// Output this <see cref="XDocument"/> to a <see cref="Stream"/>. 645/// Output this <see cref="XDocument"/> to the passed in <see cref="TextWriter"/>. 650/// <see cref="XDocument.Save(TextWriter, SaveOptions)"/>) enabling 656/// The <see cref="TextWriter"/> to output this <see cref="XDocument"/> to. 664/// Output this <see cref="XDocument"/> to a <see cref="TextWriter"/>. 683/// Output this <see cref="XDocument"/> to an <see cref="XmlWriter"/>. 694/// Output this <see cref="XDocument"/> to a <see cref="TextWriter"/>. 719/// Outputs this <see cref="XDocument"/>'s underlying XML tree. The output can 724/// Output this <see cref="XDocument"/> to a file. 729/// <see cref="XDocument.Save(string, SaveOptions)"/>) enabling 743/// Output this <see cref="XDocument"/> to an <see cref="XmlWriter"/>. 757/// Output this <see cref="XDocument"/> to a file. 787/// Output this <see cref="XDocument"/>'s underlying XML tree to the 789/// <seealso cref="XDocument.Save(XmlWriter)"/> 793/// <see cref="XDocument"/>. 816/// Output this <see cref="XDocument"/>'s underlying XML tree to the 818/// <seealso cref="XDocument.Save(XmlWriter)"/> 822/// <see cref="XDocument"/>. 872XDocument? 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)
artifacts\obj\System.Xml.XDocument\Debug\net10.0\System.Xml.XDocument.Forwards.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XDocument))]
Test.Utilities (2)
RulesetToEditorconfigConverter.cs (2)
96var ruleSetDocument = XDocument.Load(xmlReader);
Text.Analyzers (5)
CodeAnalysisDictionary.cs (3)
65var document = XDocument.Load(streamReader); 101private static IEnumerable<string> GetSectionWords(XDocument document, string section, string property)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
98var ruleSetDocument = XDocument.Load(xmlReader);
XmlFileLogger (1)
ObjectModel\Build.cs (1)
46var document = new XDocument();