156 references to Parse
ConfigurationSchemaGenerator (1)
ConfigSchemaEmitter.cs (1)
363return XElement.Parse(xml).ToString(SaveOptions.None);
KeyManagementSimulator (1)
Program.cs (1)
234private static readonly XElement serializedDescriptor = XElement.Parse(@"
Microsoft.AspNetCore.Authentication.Test (12)
CertificateTests.cs (7)
474responseAsXml = XElement.Parse(responseContent); 605responseAsXml = XElement.Parse(responseContent); 624responseAsXml = XElement.Parse(responseContent); 675responseAsXml = XElement.Parse(responseContent); 732responseAsXml = XElement.Parse(responseContent); 751responseAsXml = XElement.Parse(responseContent); 773responseAsXml = XElement.Parse(responseContent);
CookieTests.cs (1)
1929transaction.ResponseElement = XElement.Parse(transaction.ResponseText);
JwtBearerTests.cs (1)
1268transaction.ResponseElement = XElement.Parse(transaction.ResponseText);
JwtBearerTests_Handler.cs (1)
1335transaction.ResponseElement = XElement.Parse(transaction.ResponseText);
OpenIdConnect\TestServerExtensions.cs (1)
45transaction.ResponseElement = XElement.Parse(transaction.ResponseText);
TestExtensions.cs (1)
40transaction.ResponseElement = XElement.Parse(transaction.ResponseText);
Microsoft.AspNetCore.CookiePolicy.Test (1)
TestExtensions.cs (1)
37transaction.ResponseElement = XElement.Parse(transaction.ResponseText);
Microsoft.AspNetCore.DataProtection (1)
Repositories\RegistryXmlRepository.cs (1)
132return (!string.IsNullOrEmpty(data)) ? XElement.Parse(data) : null;
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (1)
EntityFrameworkCoreXmlRepository.cs (1)
58yield return XElement.Parse(key.Xml);
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (1)
RedisXmlRepository.cs (1)
48yield return XElement.Parse((string)value!);
Microsoft.AspNetCore.DataProtection.Tests (44)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
33var deserializedDescriptor = new AuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml));
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
40var deserializedDescriptor = new CngCbcAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml));
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
37var deserializedDescriptor = new CngGcmAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml));
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializerTests.cs (4)
41var deserializedDescriptor = new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml)); 75var deserializedDescriptor = new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml)); 102var deserializedDescriptor = new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml)); 125var ex = Assert.Throws<InvalidOperationException>(() => new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml)));
KeyManagement\DeferredKeyTests.cs (3)
34var key = new Key(keyId, creationDate, activationDate, expirationDate, mockInternalKeyManager.Object, XElement.Parse(@"<node />"), new[] { encryptorFactory }); 50var key = new Key(Guid.Empty, now, now, now, new Mock<IInternalXmlKeyManager>().Object, XElement.Parse(@"<node />"), new[] { encryptorFactory }); 73var key = new Key(Guid.Empty, now, now, now, mockKeyManager.Object, XElement.Parse(@"<node />"), new[] { encryptorFactory });
KeyManagement\KeyEscrowServiceProviderExtensionsTests.cs (2)
48sink.Store(new Guid("39974d8e-3e53-4d78-b7e9-4ff64a2a5d7b"), XElement.Parse("<theElement />")); 81sink.Store(new Guid("39974d8e-3e53-4d78-b7e9-4ff64a2a5d7b"), XElement.Parse("<theElement />"));
KeyManagement\XmlKeyManagerTests.cs (3)
23private static readonly XElement serializedDescriptor = XElement.Parse(@" 599mockXmlRepository.Setup(o => o.GetAllElements()).Returns(XElement.Parse(xml).Elements().ToArray()); 875var keyElement = XElement.Parse(@"
MockExtensions.cs (1)
54return XElement.Parse(outputXml);
Repositories\EphemeralXmlRepositoryTests.cs (3)
25var element1 = XElement.Parse(@"<element1 />"); 26var element2 = XElement.Parse(@"<element1 />"); 27var element3 = XElement.Parse(@"<element1 />");
Repositories\FileSystemXmlRepositoryTests.cs (5)
68var element = XElement.Parse("<element1 />"); 82var parsedElement = XElement.Parse(File.ReadAllText(fileInfo.FullName)); 98var element = XElement.Parse("<element1 />"); 116var parsedElement = XElement.Parse(File.ReadAllText(fileInfo.FullName)); 301var element = XElement.Parse("<element1 />");
Repositories\RegistryXmlRepositoryTests.cs (4)
56var element = XElement.Parse("<element1 />"); 70var parsedElement = XElement.Parse(regKey.GetValue(valueName) as string); 87var element = XElement.Parse("<element1 />"); 102var parsedElement = XElement.Parse(regKey.GetValue(valueName) as string);
XmlAssert.cs (1)
23Equal(XElement.Parse(expected), actual);
XmlEncryption\CertificateXmlEncryptionTests.cs (1)
45var originalXml = XElement.Parse(@"<mySecret value='265ee4ea-ade2-43b1-b706-09b259e58b6b' />");
XmlEncryption\DpapiNGXmlEncryptionTests.cs (1)
18var originalXml = XElement.Parse(@"<mySecret value='265ee4ea-ade2-43b1-b706-09b259e58b6b' />");
XmlEncryption\DpapiXmlEncryptionTests.cs (1)
20var originalXml = XElement.Parse(@"<mySecret value='265ee4ea-ade2-43b1-b706-09b259e58b6b' />");
XmlEncryption\NullXmlEncryptionTests.cs (2)
17var retVal = decryptor.Decrypt(XElement.Parse("<unencryptedKey><theElement /></unencryptedKey>")); 30var retVal = encryptor.Encrypt(XElement.Parse("<theElement />"));
XmlEncryption\XmlEncryptionExtensionsTests.cs (10)
18var original = XElement.Parse(@"<element />"); 32var original = XElement.Parse(@" 58var original = XElement.Parse(@$" 88var original = XElement.Parse(@$" 120var original = XElement.Parse(@$" 150var original = XElement.Parse(@" 200var original = XElement.Parse(@"<element />"); 215var original = XElement.Parse(@"<rootNode x:requiresEncryption='true' xmlns:x='http://schemas.asp.net/2015/03/dataProtection' />"); 233var original = XElement.Parse(@" 278var original = XElement.Parse(@"
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
458transaction.ResponseElement = XElement.Parse(transaction.ResponseText);
Microsoft.Build.Tasks.Core (1)
CombineXmlElements.cs (1)
40root.Add(XElement.Parse(item.ItemSpec));
Microsoft.Build.Tasks.UnitTests (1)
GenerateBindingRedirects_Tests.cs (1)
142XElement targetAppConfig = XElement.Parse(redirectResults.TargetAppConfigContent);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
300public static NamingStylePreferences Default { get; } = FromXElement(XElement.Parse(DefaultNamingPreferencesString)); 396: XElement.Parse(DefaultNamingPreferencesString); 407element.ReplaceWith(XElement.Parse("<MethodKind>Ordinary</MethodKind>"));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
52var style = NamingStyle.FromXElement(XElement.Parse(serializedNamingStyle));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (26)
ChangeSignature\RemoveParametersTests.cs (3)
255using var testState = ChangeSignatureTestState.Create(XElement.Parse(workspaceXml)); 340using var testState = ChangeSignatureTestState.Create(XElement.Parse(workspaceXml)); 365using var workspace = EditorTestWorkspace.Create(XElement.Parse("""
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (2)
3146var text = XElement.Parse(@"<Workspace> 3210var source = XElement.Parse(@"<Workspace>
ConvertNamespace\ConvertNamespaceCommandHandlerTests.cs (1)
37=> XElement.Parse(string.Format("""
EncapsulateField\EncapsulateFieldCommandHandlerTests.cs (1)
194using var workspace = EditorTestWorkspace.Create(XElement.Parse("""
EventHookup\EventHookupCommandHandlerTests.cs (1)
966using var testState = new EventHookupTestState(XElement.Parse(workspaceXml), options: null);
EventHookup\EventHookupTestState.cs (1)
54=> XElement.Parse(string.Format("""
ExtractInterface\ExtractInterfaceTests.cs (1)
1440using var workspace = EditorTestWorkspace.Create(XElement.Parse("""
ExtractMethod\ExtractMethodTests.cs (1)
11368using var workspace = EditorTestWorkspace.Create(XElement.Parse("""
MoveToNamespace\MoveToNamespaceTests.cs (1)
1442using var workspace = EditorTestWorkspace.Create(System.Xml.Linq.XElement.Parse(input), composition: s_composition, openDocuments: false);
NavigateTo\NavigateToTests.cs (7)
87var content = XElement.Parse(""" 108var content = XElement.Parse(""" 1723await TestAsync(testHost, Composition.FirstActiveAndVisible, XElement.Parse(""" 1768await TestAsync(testHost, Composition.FirstActiveAndVisible, XElement.Parse(""" 1813await TestAsync(testHost, Composition.FirstActiveAndVisible, XElement.Parse(""" 1858await TestAsync(testHost, Composition.FirstActiveAndVisible, XElement.Parse(""" 1903await TestAsync(testHost, Composition.FirstActiveAndVisible, XElement.Parse("""
Organizing\OrganizeTypeDeclarationTests.cs (1)
1167using var workspace = EditorTestWorkspace.Create(XElement.Parse("""
QuickInfo\SemanticQuickInfoSourceTests.cs (1)
7191using var workspace = EditorTestWorkspace.Create(XElement.Parse(workspaceDefinition), workspaceKind: WorkspaceKind.Interactive);
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (1)
40return XElement.Parse($"""
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (1)
56=> XElement.Parse(($@"
SymbolKey\SymbolKeyTests.cs (2)
236return TestWorkspace.CreateWorkspace(XElement.Parse($@" 245return TestWorkspace.CreateWorkspace(XElement.Parse($@"
TaskList\NoCompilationTaskListTests.cs (1)
30var workspace = EditorTestWorkspace.CreateWorkspace(XElement.Parse(
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
93var diagnosticsElement = XElement.Parse(value);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
3355Assert.Throws<XmlException>(() => XElement.Parse(xml));
Symbols\MockSymbolTests.cs (3)
185XElement.Parse( 201XElement.Parse( 212XElement.Parse(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (9)
CodeLens\AbstractCodeLensTest.cs (4)
46=> RunCountTest(XElement.Parse(input), cap); 72=> RunReferenceTest(XElement.Parse(input)); 98=> RunMethodReferenceTest(XElement.Parse(input)); 123=> RunFullyQualifiedNameTest(XElement.Parse(input));
ExtractInterface\ExtractInterfaceTestState.cs (1)
44? EditorTestWorkspace.CreateWorkspace(XElement.Parse(markup), composition: Composition)
LanguageServer\AbstractLanguageServerProtocolTests.cs (1)
379workspace.InitializeDocuments(XElement.Parse(xmlContent), openDocuments: false);
Workspaces\EditorTestWorkspace_Create.cs (1)
15=> Create(XElement.Parse(xmlDefinition), openDocuments, composition);
Workspaces\InteractiveCSharpTestWorkspaceFixture.cs (1)
24return EditorTestWorkspace.Create(XElement.Parse(workspaceDefinition), composition: composition, workspaceKind: WorkspaceKind.Interactive);
Workspaces\TestWorkspaceFixture.cs (1)
42_workspace = EditorTestWorkspace.CreateWorkspace(XElement.Parse(markup), composition: composition, workspaceKind: workspaceKind);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
SymbolFinder\DependentTypeFinderTests.cs (1)
46return TestWorkspace.CreateWorkspace(XElement.Parse("<Workspace></Workspace>"), composition: composition);
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
52var style = NamingStyle.FromXElement(XElement.Parse(serializedNamingStyle));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
VSTypeScriptHandlerTests.cs (1)
96testWorkspace.InitializeDocuments(XElement.Parse(workspaceXml), openDocuments: false);
Workspaces\LspWorkspaceManagerTests.cs (4)
302XElement.Parse(secondWorkspaceXml), 366testWorkspaceTwo.InitializeDocuments(XElement.Parse(secondWorkspaceXml)); 425testWorkspaceTwo.InitializeDocuments(XElement.Parse(secondWorkspaceXml)); 471testWorkspace.InitializeDocuments(XElement.Parse(workspaceXml));
Microsoft.CodeAnalysis.Test.Utilities (4)
Assert\AssertXml.cs (2)
32Equal(XElement.Parse(expected), XElement.Parse(actual), message: null, expectedValueSourcePath: null, expectedValueSourceLine: 0, expectedIsXmlLiteral: true);
Compilation\CompilationDifference.cs (1)
96sequencePointMarkers = ILValidation.GetSequencePointMarkers(XElement.Parse(actualPdb));
CompilationVerifier.cs (1)
638var xmlDocument = XElement.Parse(actualPdbXml);
Microsoft.CodeAnalysis.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (3)
300public static NamingStylePreferences Default { get; } = FromXElement(XElement.Parse(DefaultNamingPreferencesString)); 396: XElement.Parse(DefaultNamingPreferencesString); 407element.ReplaceWith(XElement.Parse("<MethodKind>Ordinary</MethodKind>"));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_Create.cs (1)
15=> Create(XElement.Parse(xmlDefinition), openDocuments, composition);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
CodeStyle\NamingStylePreferencesUpgradeTests.cs (1)
21var preferences = NamingStylePreferences.FromXElement(XElement.Parse(serializedPreferences));
Microsoft.DotNet.SourceBuild.Tasks (5)
src\UsageReport\ValidateUsageAgainstBaseline.cs (2)
52var used = UsageData.Parse(XElement.Parse(File.ReadAllText(DataFile))); 58var baseline = UsageData.Parse(XElement.Parse(baselineText));
src\UsageReport\WriteUsageReports.cs (3)
63UsageData data = UsageData.Parse(XElement.Parse(File.ReadAllText(DataFile))); 81var xml = XElement.Parse(File.ReadAllText(ProdConBuildManifestFile)); 178Xml = XElement.Parse(content)
Microsoft.DotNet.SourceBuild.Tasks.Tests (1)
ValidateUsageAgainstBaselineTests.cs (1)
43.Parse(@"<BaselineComparison> <New> <Usage Id=""B"" Version=""1.0.0"" /> </New> </BaselineComparison>")
Microsoft.DotNet.VersionTools (1)
BuildManifest\BuildManifestClient.cs (1)
216return XElement.Parse(contents);
Microsoft.DotNet.VersionTools.Tasks (1)
BaseDependenciesTask.cs (1)
226XElement.Parse(
Microsoft.DotNet.VersionTools.Tests (9)
BuildManifest\ManifestModelTests.cs (9)
115Action act = () => SigningInformationModel.Parse(XElement.Parse(builder.ToString())); 120SigningInformationModel.Parse(XElement.Parse(builder.ToString())).Should().NotBeNull(); 397XElement xml = XElement.Parse(ExampleBuildString); 407XElement xml = XElement.Parse(ExampleOrchestratedBuildString); 417XElement xml = XElement.Parse( 430XElement xml = XElement.Parse(@"<Build Name=""SimpleBuildManifest"" BuildId=""123""><Package Id=""Foo"" Version=""1.2.3-example"" /></Build>"); 447orchestratedModel.AddParticipantBuild(BuildModel.Parse(XElement.Parse(ExampleBuildString))); 450XElement xml = XElement.Parse(@" 473XElement xml = XElement.Parse(ExampleBuildStringWithSigningInformation);
Microsoft.VisualStudio.LanguageServices (3)
Options\VisualStudioSettingsOptionPersister.cs (2)
133return NamingStylePreferences.FromXElement(XElement.Parse(value)); 150return new Optional<object?>(codeStyle.FromXElement(XElement.Parse(value)));
Snippets\SnippetExpansionClient.cs (1)
359snippetNode = XElement.Parse(xmlNode.xml);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Options\AutomationObject\AutomationObject.Naming.cs (1)
21SetOption(NamingStyleOptions.NamingPreferences, NamingStylePreferences.FromXElement(XElement.Parse(value)));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Interactive\Commands\InteractiveWindowCommandHandlerTestState.cs (1)
59var workspaceXml = XElement.Parse($@"
Roslyn.Test.PdbUtilities (6)
Reader\PdbValidation.cs (6)
306var actualPdb = XElement.Parse(PdbToXmlConverter.ToXml(pdbStream, peStream, pdbToXmlOptions, methodName: qualifiedMethodName)).ToString(); 345var actualConverted = AdjustForConversionArtifacts(XElement.Parse(PdbToXmlConverter.ToXml(pdbStreamConverted, peStreamOriginal, pdbToXmlOptions, methodName: qualifiedMethodName)).ToString()); 361var xml = XElement.Parse(pdb); 396var actualXml = XElement.Parse(actualPdb); 397var expectedXml = XElement.Parse(expectedPdb); 651var pdbXml = XElement.Parse(pdb);
System.Private.Xml.Linq (3)
System\Xml\Linq\XElement.cs (3)
550/// <seealso cref="XElement.Parse(string)"/> 555/// <see cref="XElement.Parse(string)"/> to create an <see cref="XElement"/> from 558/// <seealso cref="XElement.Parse(string)"/>