114 references to XElement
dotnet-svcutil-lib (2)
Shared\MSBuildProj.cs (2)
538this.ProjectReferceGroup.Add(new XElement("ProjectReference", new XAttribute("Include", dependency.FullPath))); 541this.ReferenceGroup.Add(new XElement("Reference", new XAttribute("Include", dependency.AssemblyName), new XElement("HintPath", dependency.FullPath)));
dotnet-user-jwts (1)
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
63propertyGroup.Add(new XElement("UserSecretsId", newSecretsId));
dotnet-user-secrets (1)
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
63propertyGroup.Add(new XElement("UserSecretsId", newSecretsId));
illink (3)
Microsoft.AspNetCore.App.Analyzers.Test (2)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (2)
249var element = new XElement("Tree", 276parameterElement.Add(new XElement("Policy", policy));
Microsoft.AspNetCore.DataProtection (18)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptor.cs (2)
43var encryptionElement = new XElement("encryption", 48: (object)new XElement("validation",
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptor.cs (1)
54var hashElement = new XElement("hash",
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptor.cs (1)
49var validationElement = new XElement("validation",
AuthenticatedEncryption\ConfigurationModel\SecretExtensions.cs (1)
39new XElement("value", unprotectedSecretAsBase64String));
KeyManagement\XmlKeyManager.cs (9)
389new XElement(RevocationDateElementName, revocationDate), 391new XElement(KeyElementName, 393new XElement(ReasonElementName, reason)); 527new XElement(CreationDateElementName, creationDate), 528new XElement(ActivationDateElementName, activationDate), 529new XElement(ExpirationDateElementName, expirationDate), 634new XElement(RevocationDateElementName, revocationDate), 635new XElement(KeyElementName, 637new XElement(ReasonElementName, reason));
XmlEncryption\CertificateXmlEncryptor.cs (1)
89xmlDocument.Load(new XElement("root", plaintextElement).CreateReader());
XmlEncryption\DpapiNGXmlEncryptor.cs (1)
88new XElement("value",
XmlEncryption\DpapiXmlEncryptor.cs (1)
84new XElement("value",
XmlEncryption\EncryptedXmlDecryptor.cs (1)
69xmlDocument.Load(new XElement("root", encryptedElement).CreateReader());
Microsoft.AspNetCore.DataProtection.Tests (16)
KeyManagement\XmlKeyManagerTests.cs (10)
154new XElement("creationDate", creationDate), 155new XElement("activationDate", activationDate), 156new XElement("expirationDate", expirationDate)); 253new XElement("creationDate", creationDate), 254new XElement("activationDate", activationDate), 255new XElement("expirationDate", expirationDate)); 282new XElement("creationDate", creationDate), 283new XElement("activationDate", activationDate), 284new XElement("expirationDate", expirationDate)); 712new XElement("revocationDate", revocationDate));
XmlEncryption\EncryptedXmlDecryptorTests.cs (4)
20var data = new XElement("SampleData", "Lorem ipsum"); 38var data = new XElement("SampleData", "Lorem ipsum"); 56var data = new XElement("SampleData", "Lorem ipsum"); 78var data = new XElement("SampleData", "Lorem ipsum");
XmlEncryption\XmlEncryptionExtensionsTests.cs (2)
179.Returns<XElement>(el => new XElement(el.Name.LocalName + "_decrypted", new XElement(XmlConstants.EncryptedSecretElementName, "nested")));
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
UnaryServerCallHandlerTests.cs (3)
1137var requestContent = new XDocument(new XElement("name", "World")).ToString(); 1291var requestContent = new XDocument(new XElement("name", "World")).ToString(); 1321var requestContent = new XDocument(new XElement("name", "World")).ToString();
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
XElementExtensions.cs (2)
38existing = new XElement(name, new XAttribute(attribute, attributeValue)); 47var innerElement = new XElement(name, new XAttribute(attribute, attributeValue));
Microsoft.Build.Tasks.Core (5)
AssemblyDependency\GenerateBindingRedirects.cs (1)
91select new XElement(
AssemblyDependency\ResolveAssemblyReference.cs (2)
1220var node = new XElement( 1224new XElement(
CombineTargetFrameworkInfoProperties.cs (2)
49new("TargetFramework", new XAttribute("Name", EscapingUtilities.Escape(RootElementName))) : 54root.Add(new XElement(item.ItemSpec, item.GetMetadata("Value")));
Microsoft.CodeAnalysis.CodeStyle (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (2)
324new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 325new XElement("NamingRules", NamingRules.Select(n => n.CreateXElement())));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (4)
375SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 376SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 377SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 538=> new(nameof(ModifierKind), ModifierKindWrapper);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (4)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (3)
189=> new XElement("Tree", 292=> new( 366return new XElement(element.Name, children);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
200var element = new XElement("Tree",
Microsoft.CodeAnalysis.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (2)
324new XElement("NamingStyles", NamingStyles.Select(n => n.CreateXElement())), 325new XElement("NamingRules", NamingRules.Select(n => n.CreateXElement())));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (4)
375SymbolCategory.Other => new XElement(nameof(SymbolKind), (SymbolKind)_kind), 376SymbolCategory.Type => new XElement(nameof(TypeKind), GetTypeKindString((TypeKind)_kind)), 377SymbolCategory.Method => new XElement(nameof(MethodKind), GetMethodKindString((MethodKind)_kind)), 538=> new(nameof(ModifierKind), ModifierKindWrapper);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
SolutionGeneration.cs (1)
338element.Add(new XElement(XName.Get(elementName, NS), elementValue));
VisualStudioMSBuildWorkspaceTests.cs (2)
2439r => r.Add(new XElement(XName.Get("ReferenceOutputAssembly", MSBuildNamespace), "false"))); 2459r => r.Add(new XElement(XName.Get("ReferenceOutputAssembly", MSBuildNamespace), "false")));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Workspaces\TestWorkspace_XmlCreation.cs (3)
155element.Add(vbOptions.GlobalImports.AsEnumerable().Select(i => new XElement(GlobalImportElementName, i.Name))); 187=> new XElement(MetadataReferenceElementName, path); 220: new XElement(ParseOptionsElementName,
Microsoft.DotNet.Arcade.Sdk (3)
src\GenerateResxSource.cs (1)
427string escapedTrimmedValue = new XElement("summary", value).ToString();
src\SourceBuild\AddSourceMappingToNugetConfig.cs (2)
62var pkgSrc = new XElement("packageSource", new XAttribute("key", SourceName)); 65pkgSrc.Add(new XElement("package", new XAttribute("pattern", packagePattern)));
Microsoft.DotNet.Build.Tasks.Installers (5)
src\GenerateMacOSDistributionFile.cs (5)
41var titleElement = new XElement("title", $"{ProductBrandName} ({TargetArchitecture})"); 62var scriptElement = new XElement("script", new XCData(archScriptContent)); 70new XElement("pkg-ref", new XAttribute("id", component.GetMetadata("FileNameWithExtension"))))); 87.Select(c => new XElement("line", new XAttribute("choice", c.Attribute("id").Value))); 116document.Root.Add(new XElement("choices-outline", choiceLineElements));
Microsoft.DotNet.Build.Tasks.Workloads (1)
Msi\WorkloadPackGroupMsi.wix.cs (1)
95componentGroupRefElement.ReplaceWith(Enumerable.Range(1, _package.Packs.Count).Select(n => new XElement(ns + "ComponentGroupRef", new XAttribute("Id", "CG_PackageContents" + n))));
Microsoft.DotNet.SourceBuild.Tasks (8)
src\UsageReport\UsageData.cs (6)
20CreatedByRid == null ? null : new XElement( 23ProjectDirectories?.Any() != true ? null : new XElement( 26.Select(dir => new XElement("Dir", dir))), 27NeverRestoredTarballPrebuilts?.Any() != true ? null : new XElement( 32IgnorePatterns?.Any() != true ? null : new XElement( 36Usages?.Any() != true ? null : new XElement(
src\UsageReport\ValidateUsageAgainstBaseline.cs (2)
97new XElement( 111report.Add(new XElement("Removed", diff.Removed.Select(id => id.ToXElement())));
Microsoft.DotNet.VersionTools (2)
BuildManifest\Model\BuildIdentity.cs (1)
163public XElement ToXmlBuildElement() => new XElement("Build", ToXmlAttributes());
BuildManifest\Model\SigningInformationModel.cs (1)
35public XElement ToXml() => IsEmpty() ? null : new XElement(
Microsoft.DotNet.XliffTasks (3)
Model\XElementExtensions.cs (1)
35targetElement = new XElement(Target, new XAttribute("state", "new"));
Model\XlfDocument.cs (2)
190new XElement(Source, sourceNode.Source), 192new XElement(Note, sourceNode.Note == "" ? null : sourceNode.Note));
Microsoft.Extensions.FileProviders.Embedded.Tests (3)
Manifest\TestEntry.cs (1)
24new XElement("File", new XAttribute("Name", Name), new XElement("ResourcePath", ResourcePath)) :
TestAssembly.cs (2)
35new XElement("ManifestVersion", "1.0"), 36new XElement("FileSystem", entry.Children.Select(c => c.ToXElement()))));
Microsoft.Maui.Resizetizer (2)
GeneratePackageAppxManifest.cs (2)
320 showname.Add(new XElement(xshowon, new XAttribute("Tile", "square150x150Logo"))); 322 showname.Add(new XElement(xshowon, new XAttribute("Tile", "wide310x150Logo")));
Microsoft.ML.Maml (1)
HelpCommand.cs (1)
509return new XElement("DefaultValue", a.DefaultValue);
Microsoft.VisualStudio.LanguageServices (7)
Snippets\SnippetExpansionClient.cs (7)
659new XElement(snippetNamespace + "ID", new XText(parameter.Name)), 660new XElement(snippetNamespace + "Default", new XText(parameterValues.GetValueOrDefault(parameter.Name, ""))))); 671new XElement(snippetNamespace + "ID", new XText(PlaceholderSnippetField)), 672new XElement(snippetNamespace + "Default", new XText("")))); 687new XElement( 694new XElement(snippetNamespace + "Title", new XText(methodName)), 695new XElement(snippetNamespace + "Description", new XText(s_fullMethodCallDescriptionSentinel))),
Stress.ApiService (1)
Program.cs (1)
198var xmlWithUrl = new XElement(new XElement("url", "http://localhost:8080")).ToString();
System.Private.Xml.Linq (2)
System\Xml\Linq\XElement.cs (2)
95public XElement(XName name, params object?[] content) : this(name, (object)content) { } 1270AddNode(new XElement(name, GetStringValue(value)));
XmlFileLogger (1)
LogProcessNode.cs (1)
131propElement.Add(new XElement("Property", new XAttribute("Name", p.Key)) { Value = p.Value });