395 references to XAttribute
aspire (22)
Projects\DotNetBasedAppHostServerProject.cs (13)
188new XAttribute("Include", integration.ProjectPath!), 198new XAttribute("Include", projectPath), 217new XAttribute("Include", hostingPath), 230new XAttribute("Include", p.Name), 231new XAttribute("Version", p.Version))))); 240doc.Root!.Add(new XElement("Import", new XAttribute("Project", appHostInTargets))); 244doc.Root!.Add(new XElement("Import", new XAttribute("Project", sdkInTargets))); 252new XElement("ProjectReference", new XAttribute("Include", dashboardProject)))); 259new XElement("ProjectReference", new XAttribute("Include", remoteHostProject)))); 263doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteHostProjectMetadataSources"))); 264doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteProjectMetadataSources"))); 385new XAttribute("Include", "appsettings.json"), 386new XAttribute("CopyToOutputDirectory", "PreserveNewest"))));
Projects\PrebuiltAppHostServer.cs (9)
294new XAttribute("Sdk", "Microsoft.NET.Sdk"), 307new XAttribute("Include", p.Name), 308new XAttribute("Version", p.Version)); 316new XAttribute("Include", p.ProjectPath!))))); 323new XAttribute("Name", "_WriteProjectRefAssemblyNames"), 324new XAttribute("AfterTargets", "Build"), 326new XAttribute("File", Path.Combine(outputDir, "_project-ref-assemblies.txt")), 327new XAttribute("Lines", "@(_ResolvedProjectReferencePaths->'%(Filename)')"), 328new XAttribute("Overwrite", "true"))));
Aspire.Hosting.Maui (21)
Utilities\MauiEnvironmentHelper.cs (21)
97new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"), 98new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')") 105itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={value}"))); 112new XAttribute("Name", "AspireGenerateAndroidEnvironmentFiles"), 113new XAttribute("BeforeTargets", "_GenerateEnvironmentFiles"), 114new XAttribute("Condition", "'@(_GeneratedAndroidEnvironment)' != ''") 120new XAttribute("File", "$(IntermediateOutputPath)__aspire_environment__.txt"), 121new XAttribute("Lines", "@(_GeneratedAndroidEnvironment)"), 122new XAttribute("Overwrite", "True"), 123new XAttribute("WriteOnlyWhenDifferent", "True") 129new XElement("AndroidEnvironment", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 135new XElement("FileWrites", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 141new XAttribute("Files", "$(_AndroidStampDirectory)_GeneratePackageManagerJava.stamp") 268new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"), 269new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')") 283new XAttribute("Include", $"{key}={encodedValue}"))); 291new XAttribute("Name", "AspireLogMlaunchEnvironmentVariables"), 292new XAttribute("AfterTargets", "PrepareForBuild"), 293new XAttribute("Condition", "'@(MlaunchEnvironmentVariables)' != ''"), 296new XAttribute("Importance", "High"), 297new XAttribute("Text", "Aspire forwarding mlaunch environment variables: @(MlaunchEnvironmentVariables, ', ')")
dotnet-svcutil-lib (14)
Shared\MSBuildProj.cs (12)
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))); 544this.PacakgeReferenceGroup.Add(new XElement("PackageReference", new XAttribute("Include", dependency.Name), new XAttribute("Version", dependency.Version))); 547this.ReferenceGroup.Add(new XElement("DotNetCliToolReference", new XAttribute("Include", dependency.Name), new XAttribute("Version", dependency.Version))); 562new XAttribute("CopyToOutputDirectory", "always"), 563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")), 564new XAttribute("Link", $"{framework}/%(RecursiveDir)%(Filename)%(Extension)"))); 572new XAttribute("CopyToOutputDirectory", "always"), 573new XAttribute("Include", $"{basePath}\\{framework}\\**"), 574new XAttribute("Link", $"{framework}/%(RecursiveDir)%(Filename)%(Extension)")));
Shared\Utilities\RuntimeEnvironmentHelper.cs (2)
101addElement.Add(new XAttribute("key", feedName), new XAttribute("value", packageFeed));
GenerateDocumentationAndConfigFiles (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
109new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 110new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 111new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 112new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID), 467new XAttribute(nameof(Name), Name), 468new XAttribute(nameof(Prefix), Prefix ?? string.Empty), 469new XAttribute(nameof(Suffix), Suffix ?? string.Empty), 470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty), 471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
27new XAttribute(nameof(SymbolSpecificationID), SymbolSpecificationID), 28new XAttribute(nameof(NamingStyleID), NamingStyleID), 29new XAttribute(nameof(EnforcementLevel), EnforcementLevel.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
illink (4)
Microsoft.AspNetCore.DataProtection (18)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptor.cs (2)
44new XAttribute("algorithm", Configuration.EncryptionAlgorithm)); 49new XAttribute("algorithm", Configuration.ValidationAlgorithm));
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptor.cs (3)
47new XAttribute("algorithm", Configuration.EncryptionAlgorithm), 48new XAttribute("keyLength", Configuration.EncryptionAlgorithmKeySize)); 55new XAttribute("algorithm", Configuration.HashAlgorithm));
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptor.cs (2)
46new XAttribute("algorithm", Configuration.EncryptionAlgorithm), 47new XAttribute("keyLength", Configuration.EncryptionAlgorithmKeySize));
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptor.cs (3)
46new XAttribute("algorithm", ManagedAlgorithmHelpers.TypeToFriendlyName(Configuration.EncryptionAlgorithmType)), 47new XAttribute("keyLength", Configuration.EncryptionAlgorithmKeySize)); 50new XAttribute("algorithm", ManagedAlgorithmHelpers.TypeToFriendlyName(Configuration.ValidationAlgorithmType)));
KeyManagement\XmlKeyManager.cs (7)
388new XAttribute(VersionAttributeName, 1), 392new XAttribute(IdAttributeName, RevokeAllKeysValue)), 525new XAttribute(IdAttributeName, keyId), 526new XAttribute(VersionAttributeName, 1), 531new XAttribute(DeserializerTypeAttributeName, descriptorXmlInfo.DeserializerType.AssemblyQualifiedName!), 633new XAttribute(VersionAttributeName, 1), 636new XAttribute(IdAttributeName, keyId)),
XmlEncryption\XmlEncryptionExtensions.cs (1)
151new XAttribute(XmlConstants.DecryptorTypeAttributeName, entry.Value.DecryptorType.AssemblyQualifiedName!),
Microsoft.Build.Tasks.Core (15)
AssemblyDependency\GenerateBindingRedirects.cs (9)
101new XAttribute("name", redirect.Key.Name), 102new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(redirect.Key.GetPublicKeyToken())), 103new XAttribute("culture", String.IsNullOrEmpty(redirect.Key.CultureName) ? "neutral" : redirect.Key.CultureName)), 106new XAttribute("oldVersion", "0.0.0.0-" + redirect.Value), 107new XAttribute("newVersion", redirect.Value)))); 301new XAttribute("name", newName), 302new XAttribute( 305new XAttribute( 311attributes.Add(new XAttribute("processorArchitecture", newProcessorArchitecture.ToString()));
AssemblyDependency\ResolveAssemblyReference.cs (5)
1379assemblyIdentityAttributes.Add(new XAttribute("name", idealRemappingPartialAssemblyName.Name)); 1383assemblyIdentityAttributes.Add(new XAttribute("culture", String.IsNullOrEmpty(idealRemappingPartialAssemblyName.CultureName) ? "neutral" : idealRemappingPartialAssemblyName.CultureName)); 1386assemblyIdentityAttributes.Add(new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(publicKeyToken))); 1397new XAttribute("oldVersion", "0.0.0.0-" + newVerStr), 1398new XAttribute("newVersion", newVerStr))));
CombineTargetFrameworkInfoProperties.cs (1)
50new("TargetFramework", new XAttribute("Name", EscapingUtilities.Escape(RootElementName))) :
Microsoft.CodeAnalysis.Analyzers (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
109new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 110new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 111new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 112new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID), 467new XAttribute(nameof(Name), Name), 468new XAttribute(nameof(Prefix), Prefix ?? string.Empty), 469new XAttribute(nameof(Suffix), Suffix ?? string.Empty), 470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty), 471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
27new XAttribute(nameof(SymbolSpecificationID), SymbolSpecificationID), 28new XAttribute(nameof(NamingStyleID), NamingStyleID), 29new XAttribute(nameof(EnforcementLevel), EnforcementLevel.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.AnalyzerUtilities (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
109new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 110new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 111new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 112new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID), 467new XAttribute(nameof(Name), Name), 468new XAttribute(nameof(Prefix), Prefix ?? string.Empty), 469new XAttribute(nameof(Suffix), Suffix ?? string.Empty), 470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty), 471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
27new XAttribute(nameof(SymbolSpecificationID), SymbolSpecificationID), 28new XAttribute(nameof(NamingStyleID), NamingStyleID), 29new XAttribute(nameof(EnforcementLevel), EnforcementLevel.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.CodeStyle (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
109new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 110new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 111new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 112new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID), 467new XAttribute(nameof(Name), Name), 468new XAttribute(nameof(Prefix), Prefix ?? string.Empty), 469new XAttribute(nameof(Suffix), Suffix ?? string.Empty), 470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty), 471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
27new XAttribute(nameof(SymbolSpecificationID), SymbolSpecificationID), 28new XAttribute(nameof(NamingStyleID), NamingStyleID), 29new XAttribute(nameof(EnforcementLevel), EnforcementLevel.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.ResxSourceGenerator (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
109new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 110new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 111new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 112new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID), 467new XAttribute(nameof(Name), Name), 468new XAttribute(nameof(Prefix), Prefix ?? string.Empty), 469new XAttribute(nameof(Suffix), Suffix ?? string.Empty), 470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty), 471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
27new XAttribute(nameof(SymbolSpecificationID), SymbolSpecificationID), 28new XAttribute(nameof(NamingStyleID), NamingStyleID), 29new XAttribute(nameof(EnforcementLevel), EnforcementLevel.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.Workspaces (36)
Log\WorkspaceStructureLogger.cs (20)
155var referenceElement = new XElement("projectReference", new XAttribute("id", SanitizePath(projectReference.ProjectId.ToString()))); 191new XAttribute("id", diagnostic.Id), 192new XAttribute("severity", diagnostic.Severity.ToString()), 193new XAttribute("path", SanitizePath(diagnostic.Location.GetLineSpan().Path)), 204new XAttribute("hintName", document.HintName), 205new XAttribute("path", SanitizePath(document.FilePath)), 206new XAttribute("generatorType", identity.Generator.TypeName), 207new XAttribute("generatorAssembly", identity.Generator.AssemblyName), 208new XAttribute("generatorAssemblyVersion", identity.Generator.AssemblyVersion.ToString()), 209new XAttribute("generatorAssemblyPath", SanitizePath(identity.Generator.AssemblyPath))); 242var aliasesAttribute = new XAttribute("aliases", string.Join(",", reference.Properties.Aliases)); 253new XAttribute("file", SanitizePath(portableExecutableReference.FilePath)), 254new XAttribute("display", SanitizePath(portableExecutableReference.Display)), 259return new XElement("metadataReference", new XAttribute("display", SanitizePath(reference.Display))); 265new XAttribute("path", SanitizePath(reference.FullPath)), 266new XAttribute("display", SanitizePath(reference.Display))); 283typesElement.Add(new XElement("type", new XAttribute("name", type.ToDisplayString()))); 290new XAttribute("objectId", compilationId.Value), 291new XAttribute("assemblyIdentity", compilation.Assembly.Identity.ToString()), 301var documentElement = new XElement(elementName, new XAttribute("path", SanitizePath(document.FilePath)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
109new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 110new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 111new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 112new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID), 467new XAttribute(nameof(Name), Name), 468new XAttribute(nameof(Prefix), Prefix ?? string.Empty), 469new XAttribute(nameof(Suffix), Suffix ?? string.Empty), 470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty), 471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
27new XAttribute(nameof(SymbolSpecificationID), SymbolSpecificationID), 28new XAttribute(nameof(NamingStyleID), NamingStyleID), 29new XAttribute(nameof(EnforcementLevel), EnforcementLevel.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.DotNet.Build.Manifest (1)
XElementParsingExtensions.cs (1)
37.Select(pair => new XAttribute(pair.Key, pair.Value))
Microsoft.DotNet.Build.Tasks.Installers (8)
src\GenerateMacOSDistributionFile.cs (8)
66new XAttribute("id", component.GetMetadata("FileNameWithExtension")), 67new XAttribute("visible", "true"), 68new XAttribute("title", component.GetMetadata("Title")), 69new XAttribute("description", component.GetMetadata("Description")), 70new XElement("pkg-ref", new XAttribute("id", component.GetMetadata("FileNameWithExtension"))))); 87.Select(c => new XElement("line", new XAttribute("choice", c.Attribute("id").Value))); 91new XAttribute("id", component.GetMetadata("FileNameWithExtension")), 107optionsElement.Add(new XAttribute("hostArchitectures", hostArchitecture));
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\FinalizeInsertionVsixFile.cs (1)
103systemComponent = new XAttribute(systemComponentName, true);
Microsoft.DotNet.HotReload.Watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
1131solutionElement.Add(new XElement("Project", new XAttribute("Path", projectPath)));
Microsoft.DotNet.PackageTesting (10)
VerifyClosure.cs (10)
361new XAttribute("Source", assembly.Name), 362new XAttribute("Target", reference.Name))); 370new XAttribute("Source", assembly.Name), 371new XAttribute("Target", moduleReference))); 381new XAttribute("Id", "native"), 382new XAttribute("Background", "Blue") 386new XAttribute("Id", "managed"), 387new XAttribute("Background", "Green") 401new XAttribute("Id", id), 402new XAttribute("Category", isNative ? "native": "managed")));
Microsoft.DotNet.SharedFramework.Sdk (23)
src\arcade\src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (10)
361new XAttribute("Source", assembly.Name), 362new XAttribute("Target", reference.Name))); 370new XAttribute("Source", assembly.Name), 371new XAttribute("Target", moduleReference))); 381new XAttribute("Id", "native"), 382new XAttribute("Background", "Blue") 386new XAttribute("Id", "managed"), 387new XAttribute("Background", "Green") 401new XAttribute("Id", id), 402new XAttribute("Category", isNative ? "native": "managed")));
src\CreateFrameworkListFile.cs (13)
64?.Select(item => new XAttribute(item.ItemSpec, item.GetMetadata("Value"))) 160new XAttribute("Type", type), 161new XAttribute("Path", path)); 165element.Add(new XAttribute("Language", analyzerLanguage)); 171new XAttribute("Culture", Path.GetFileName(Path.GetDirectoryName(path)))); 177element.Add(new XAttribute("DropFromSingleFile", "true")); 201new XAttribute("AssemblyName", f.AssemblyName.Name), 202new XAttribute("PublicKeyToken", publicKeyTokenHex), 203new XAttribute("AssemblyVersion", f.AssemblyName.Version)); 211element.Add(new XAttribute("FileVersion", f.FileVersion)); 221element.Add(new XAttribute("Profile", profile)); 228element.Add(new XAttribute("ReferencedByDefault", referencedByDefault)); 246element.Add(new XAttribute("DropFromSingleFile", "true"));
Microsoft.DotNet.SourceBuild.Tasks (4)
src\UsageReport\XmlParsingHelpers.cs (4)
17new XAttribute("Id", ident.Id), 18new XAttribute("Version", ident.Version.OriginalVersion)); 21value == null ? null : new XAttribute(name, value); 24value == false ? null : new XAttribute(name, value);
Microsoft.DotNet.XliffTasks (13)
Model\XElementExtensions.cs (3)
35targetElement = new XElement(Target, new XAttribute("state", "new")); 42targetElement.Add(new XAttribute("state", "new")); 76stateAttribute = new XAttribute("state", value);
Model\XlfDocument.cs (10)
50new XAttribute("xmlns", XliffNS.NamespaceName), 51new XAttribute(XNamespace.Xmlns + "xsi", XsiNS.NamespaceName), 52new XAttribute("version", "1.2"), 53new XAttribute(XsiNS + "schemaLocation", $"{XliffNS.NamespaceName} xliff-core-1.2-transitional.xsd"), 55new XAttribute("datatype", "xml"), 56new XAttribute("source-language", "en"), 57new XAttribute("target-language", targetLanguage), 58new XAttribute("original", "_"), // placeholder will be replaced on first update 189new XAttribute("id", sourceNode.Id), 191new XElement(Target, new XAttribute("state", "new"), sourceNode.Source),
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)
467new XAttribute("Kind", c.Kind),
Microsoft.NET.Build.Tasks (9)
GenerateToolsSettingsFile.cs (6)
69new XAttribute("Name", commandName)); 81packageNode.Add(new XAttribute("RuntimeIdentifier", toolPackageRuntimeIdentifier)); 84packageNode.Add(new XAttribute("Id", ridPackageId)); 93commandNode.Add(new XAttribute("EntryPoint", entryPointRelativePath), 94new XAttribute("Runner", commandRunner)); 98new XAttribute("Version", formatVersion),
WriteAppConfigWithSupportedRuntime.cs (3)
125new XAttribute("version", supportedRuntimeVersion)); 135new XAttribute("version", "v4.0"), 136new XAttribute("sku", $"{targetFrameworkIdentifier},Version={targetFrameworkVersion}{profileInSku}"));
Microsoft.NET.HostModel (12)
ComHost\RegFreeComManifest.cs (12)
30XElement manifest = new XElement(ns + "assembly", new XAttribute("manifestVersion", "1.0")); 32new XAttribute("type", "win32"), 33new XAttribute("name", $"{assemblyName}.X"), 34new XAttribute("version", assemblyVersion))); 56XElement fileElement = new XElement(ns + "file", new XAttribute("name", comHostName)); 67XElement comClassElement = new XElement(ns + "comClass", new XAttribute("clsid", guid.ToString("B")), new XAttribute("threadingModel", "Both")); 70comClassElement.Add(new XAttribute("progid", progIdValue.GetString())); 91new XAttribute("tlbid", name.ToString("B")), 92new XAttribute("resourceid", typeLibrary.Key), 93new XAttribute("version", version), 94new XAttribute("helpdir", ""));
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (7)
BlazorWriteSatelliteAssemblyFile.cs (3)
35new XAttribute("Name", item.ItemSpec), 36new XAttribute("Culture", item.GetMetadata("Culture")), 37new XAttribute("DestinationSubDirectory", item.GetMetadata("DestinationSubDirectory"))));
CreateBlazorTrimmerRootDescriptorFile.cs (4)
52new XAttribute("fullname", "*"), 53new XAttribute("required", typeRequired), 58attributes.Add(new XAttribute("preserve", typePreserved)); 62new XAttribute("fullname", assemblyName),
Microsoft.NET.Sdk.Publish.Tasks (5)
Tasks\GenerateEnvTransform.cs (4)
77new XElement("environmentVariable", new XAttribute("name", envVariable.Key), 78new XAttribute("value", envVariable.Value), 79new XAttribute(xdt + "Locator", "Match(name)"), 80new XAttribute(xdt + "Transform", "InsertIfMissing"));
WebConfigTransform.cs (1)
123new XAttribute("arguments", (appPath + " " + (string?)argumentsAttribute).Trim()));
Microsoft.NET.Sdk.StaticWebAssets.Tasks (8)
GeneratePackageAssetsTargetsFile.cs (1)
34new XAttribute("Include", $@"$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory){ManifestFileName}'))"),
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
55new XAttribute("Include", element.Route),
GenerateStaticWebAssetsPropsFile.cs (1)
106new XAttribute("Include", fullPathExpression),
Legacy\GenerateStaticWebAssetsPropsFile50.cs (1)
63new XAttribute("Include", fullPathExpression),
Legacy\GenerateV1StaticWebAssetsManifest.cs (3)
40new XAttribute("Version", "1.0"), 124new XAttribute("BasePath", normalizedBasePath), 125new XAttribute("Path", normalizedContentRoot)));
StaticWebAssetsGeneratePackagePropsFile.cs (1)
30root.Add(new XElement("Import", new XAttribute("Project", element)));
NuGet.Commands (14)
RestoreCommand\Utility\BuildAssetsUtils.cs (14)
135new XAttribute("Name", "EmitMSBuildWarning"), 136new XAttribute("BeforeTargets", "Build"), 139new XAttribute("Text", Strings.MSBuildWarning_MultiTarget)))); 214new XAttribute("Condition", $" {ExcludeAllCondition} "), 223new XAttribute("Condition", $" {ExcludeAllCondition} "), 236new XAttribute("ToolsVersion", "14.0"), 237new XAttribute("xmlns", Namespace.NamespaceName))); 245new XAttribute("Condition", $" '$({propertyName})' == '' "), 251return new XElement(Namespace + itemName, new XAttribute("Include", path)); 257new XAttribute("Project", path), 258new XAttribute("Condition", $"Exists('{path}')")); 264new XAttribute("Include", path), 265new XAttribute("Condition", $"Exists('{path}')"), 337itemGroup.Add(new XAttribute("Condition", conditionValue));
NuGet.Packaging (41)
PackageCreation\Authoring\Manifest.cs (3)
106new XAttribute("src", file.Source!), 107file.Target != null ? new XAttribute("target", file.Target) : null, 108file.Exclude != null ? new XAttribute("exclude", file.Exclude) : null))) : null)).Save(stream);
PackageCreation\Authoring\PackageBuilder.cs (17)
1194new XAttribute("Type", "http://schemas.microsoft.com/packaging/2010/07/manifest"), 1195new XAttribute("Target", $"/{path}"), 1196new XAttribute("Id", GenerateRelationshipId($"/{path}"))), 1198new XAttribute("Type", "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"), 1199new XAttribute("Target", $"/{psmdcpPath}"), 1200new XAttribute("Id", GenerateRelationshipId($"/{psmdcpPath}"))) 1219new XAttribute("Extension", "rels"), 1220new XAttribute("ContentType", "application/vnd.openxmlformats-package.relationships+xml")), 1222new XAttribute("Extension", "psmdcp"), 1223new XAttribute("ContentType", "application/vnd.openxmlformats-package.core-properties+xml")) 1229new XAttribute("Extension", extension), 1230new XAttribute("ContentType", "application/octet") 1238new XAttribute("PartName", file), 1239new XAttribute("ContentType", "application/octet") 1266new XAttribute(XNamespace.Xmlns + "dc", dcText), 1267new XAttribute(XNamespace.Xmlns + "dcterms", dctermsText), 1268new XAttribute(XNamespace.Xmlns + "xsi", xsiText),
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (13)
202return new XElement(ns + NuspecUtility.FrameworkReference, new XAttribute(NuspecUtility.Name, frameworkReference.Name)); 207return new XElement(ns + Reference, new XAttribute(File, reference)); 214attributes.Add(new XAttribute("id", dependency.Id)); 218attributes.Add(new XAttribute("version", dependency.VersionRange.ToLegacyShortString())); 223attributes.Add(new XAttribute("include", string.Join(",", dependency.Include))); 228attributes.Add(new XAttribute("exclude", string.Join(",", dependency.Exclude))); 245new XAttribute(AssemblyName, reference.AssemblyName), 247new XAttribute("targetFramework", string.Join(", ", reference.SupportedFrameworks.Where(f => f.IsSpecificFramework).Select(f => f.GetFrameworkString()))) : 294attributeList.Add(new XAttribute(NuspecUtility.Type, repository.Type)); 299attributeList.Add(new XAttribute(NuspecUtility.RepositoryUrl, repository.Url)); 304attributeList.Add(new XAttribute(NuspecUtility.RepositoryBranch, repository!.Branch!)); 309attributeList.Add(new XAttribute(NuspecUtility.RepositoryCommit, repository!.Commit!)); 352return new XAttribute(name, value);
PackagesConfigWriter.cs (8)
132var minClientVersionAttribute = new XAttribute(XName.Get(PackagesConfig.MinClientAttributeName), _minClientVersion.ToNormalizedString()); 365node.Add(new XAttribute(XName.Get(PackagesConfig.IdAttributeName), entry.PackageIdentity.Id)); 366node.Add(new XAttribute(XName.Get(PackagesConfig.VersionAttributeName), entry.PackageIdentity.Version)); 376node.Add(new XAttribute(XName.Get(PackagesConfig.TargetFrameworkAttributeName), frameworkShortName)); 382node.Add(new XAttribute(XName.Get(PackagesConfig.allowedVersionsAttributeName), entry.AllowedVersions.ToString())); 387node.Add(new XAttribute(XName.Get(PackagesConfig.developmentDependencyAttributeName), "true")); 392node.Add(new XAttribute(XName.Get(PackagesConfig.RequireInstallAttributeName), "true")); 486var attribute = new XAttribute(name, newEntryNode.Attribute(name)!.Value);
Roslyn.Diagnostics.Analyzers (16)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
109new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 110new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 111new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 112new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID), 467new XAttribute(nameof(Name), Name), 468new XAttribute(nameof(Prefix), Prefix ?? string.Empty), 469new XAttribute(nameof(Suffix), Suffix ?? string.Empty), 470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty), 471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
27new XAttribute(nameof(SymbolSpecificationID), SymbolSpecificationID), 28new XAttribute(nameof(NamingStyleID), NamingStyleID), 29new XAttribute(nameof(EnforcementLevel), EnforcementLevel.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
System.Private.Xml.Linq (9)
System\Xml\Linq\XContainer.cs (4)
911e.AppendAttributeSkipNotify(new XAttribute(_aCache.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value)); 965e.AppendAttributeSkipNotify(new XAttribute( 1033XAttribute a = new XAttribute(_aCache.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value); 1147XAttribute a = new XAttribute(
System\Xml\Linq\XElement.cs (2)
1230AppendAttribute(new XAttribute(name, value)); 2071XAttribute a = new XAttribute(XNamespace.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value);
System\Xml\Linq\XNodeBuilder.cs (1)
91XAttribute a = new XAttribute(_attrName!, _attrValue!);
System\Xml\Schema\XNodeValidator.cs (1)
288a = new XAttribute(XNamespace.Get(sa.QualifiedName.Namespace).GetName(sa.QualifiedName.Name), GetDefaultValue(sa)!);
System\Xml\XPath\XNodeNavigator.cs (1)
843System.Threading.Interlocked.CompareExchange(ref s_XmlNamespaceDeclaration, new XAttribute(XNamespace.Xmlns.GetName("xml"), xmlPrefixNamespace), null);