521 instantiations of XAttribute
aspire (34)
Commands\AddCommand.cs (2)
349new System.Xml.Linq.XAttribute("key", s), 350new System.Xml.Linq.XAttribute("value", s))))));
Projects\CSharpProjectFile.cs (7)
191var root = new XElement("Project", new XAttribute("Sdk", Sdk)); 217root.Add(Imports.Select(import => new XElement("Import", new XAttribute("Project", import.ProjectPath)))); 228var element = new XElement("PackageReference", new XAttribute("Include", packageReference.Name)); 232element.Add(new XAttribute(packageReference.VersionAttributeName, packageReference.Version)); 243var element = new XElement("ProjectReference", new XAttribute("Include", projectReference.ProjectPath)); 254var element = new XElement("None", new XAttribute("Update", noneItem.Update)); 258element.Add(new XAttribute("CopyToOutputDirectory", noneItem.CopyToOutputDirectory));
Projects\DotNetBasedAppHostServerProject.cs (2)
204projectFile.Targets.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteHostProjectMetadataSources"))); 205projectFile.Targets.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteProjectMetadataSources")));
Projects\IntegrationClosureBuilder.cs (23)
81new XAttribute("Name", "_WriteAspireProjectRefAssemblyNames"), 82new XAttribute("AfterTargets", "Build"), 83new XAttribute("Condition", "'$(AspireProjectRefAssemblyNamesFile)' != ''"), 85new XAttribute("File", "$(AspireProjectRefAssemblyNamesFile)"), 86new XAttribute("Lines", "@(_ResolvedProjectReferencePaths->'%(Filename)')"), 87new XAttribute("Overwrite", "true"), 88new XAttribute("WriteOnlyWhenDifferent", "true")))); 92new XAttribute("Name", "_WriteAspireClosureManifest"), 93new XAttribute("AfterTargets", "Build"), 94new XAttribute("Condition", "'$(AspireClosureSourcesFile)' != ''"), 95new XAttribute("DependsOnTargets", "ResolveLockFileCopyLocalFiles"), 97new XAttribute("File", "$(AspireClosureSourcesFile)"), 98new XAttribute("Lines", "@(ReferenceCopyLocalPaths->'%(FullPath)')"), 99new XAttribute("Overwrite", "true"), 100new XAttribute("WriteOnlyWhenDifferent", "true")), 102new XAttribute("File", "$(AspireClosureMetadataFile)"), 103new XAttribute("Lines", "@(ReferenceCopyLocalPaths->'%(NuGetPackageId)|%(NuGetPackageVersion)|%(PathInPackage)|%(AssetType)')"), 104new XAttribute("Overwrite", "true"), 105new XAttribute("WriteOnlyWhenDifferent", "true")), 107new XAttribute("File", "$(AspireClosureTargetsFile)"), 108new XAttribute("Lines", "@(ReferenceCopyLocalPaths->'%(DestinationSubDirectory)%(Filename)%(Extension)')"), 109new XAttribute("Overwrite", "true"), 110new XAttribute("WriteOnlyWhenDifferent", "true"))));
aspire-tray (1)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (1)
29new XElement("plist", new XAttribute("version", "1.0"),
Aspire.Cli.EndToEnd.Tests (1)
Helpers\KubernetesDeployTestHelpers.cs (1)
378new System.Xml.Linq.XAttribute("Include", $"../{resourceProject}/{resourceProject}.csproj")));
Aspire.Cli.Tests (4)
Projects\ProjectUpdaterTests.cs (4)
78new System.Xml.Linq.XAttribute("Project", "Sdk.props"), 79new System.Xml.Linq.XAttribute("Sdk", "Aspire.AppHost.Sdk"), 80new System.Xml.Linq.XAttribute("Version", "13.6.1"), 81new System.Xml.Linq.XAttribute("Condition", "'$(UseLegacySdk)' == 'true'")));
Aspire.Hosting.Azure.Provisioning.Generators (5)
AspireProvisioningProxyGenerator.cs (5)
2136new XAttribute("name", parameter.SourceName), 2187new XAttribute("name", parameter.GeneratedName), 2250return new XAttribute(attribute.Name, replacementName); 2258return new XAttribute(attribute.Name, generatedName); 2261return new XAttribute(attribute.Name, attribute.Value);
Aspire.Hosting.Dotnet (17)
DotnetProjectBuildResource.cs (17)
236new XAttribute("DefaultTargets", "Build"), 242new XAttribute( 250new XAttribute("Condition", "'$(NuGetRestoreTargets)' == ''"), 255new XAttribute("Project", "$(NuGetRestoreTargets)"), 256new XAttribute( 292new XAttribute("Importance", "high"), 293new XAttribute("Text", "Restoring projects individually as configured by the AppHost."))); 301new XAttribute("Importance", "high"), 302new XAttribute("Text", "Restoring projects individually because RestoreUseStaticGraphEvaluation is enabled."), 303new XAttribute("Condition", "'$(RestoreUseStaticGraphEvaluation)' == 'true'")), 306new XAttribute("Importance", "high"), 307new XAttribute("Text", "Restoring projects individually because the selected NuGet restore targets are unavailable."), 308new XAttribute( 320new XAttribute("Name", name), 323new XAttribute("Projects", "@(ProjectFile)"), 324new XAttribute("Targets", name), 325new XAttribute("BuildInParallel", buildInParallel)));
Aspire.Hosting.Maui (21)
Utilities\MauiEnvironmentHelper.cs (21)
81new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"), 82new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')") 90itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={encodedValue}"))); 97new XAttribute("Name", "AspireGenerateAndroidEnvironmentFiles"), 98new XAttribute("BeforeTargets", "_GenerateEnvironmentFiles"), 99new XAttribute("Condition", "'@(_GeneratedAndroidEnvironment)' != ''") 105new XAttribute("File", "$(IntermediateOutputPath)__aspire_environment__.txt"), 106new XAttribute("Lines", "@(_GeneratedAndroidEnvironment)"), 107new XAttribute("Overwrite", "True"), 108new XAttribute("WriteOnlyWhenDifferent", "True") 114new XElement("AndroidEnvironment", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 120new XElement("FileWrites", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 126new XAttribute("Files", "$(_AndroidStampDirectory)_GeneratePackageManagerJava.stamp") 222new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"), 223new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')") 236new XAttribute("Include", $"{key}={encodedValue}"))); 244new XAttribute("Name", "AspireLogMlaunchEnvironmentVariables"), 245new XAttribute("AfterTargets", "PrepareForBuild"), 246new XAttribute("Condition", "'@(MlaunchEnvironmentVariables)' != ''"), 249new XAttribute("Importance", "High"), 250new XAttribute("Text", "Aspire forwarding mlaunch environment variables: @(MlaunchEnvironmentVariables, ', ')")
Aspire.Templates.Tests (4)
BuildAndRunTemplateTests.cs (4)
103new XAttribute("Include", reference.Attribute("Include")!.Value), 104new XAttribute("Version", versionAttribute.Value))); 159new XAttribute("Name", "Aspire.AppHost.Sdk"), new XAttribute("Version", version)));
Aspire.Tray.Tests (1)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (1)
29new XElement("plist", new XAttribute("version", "1.0"),
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),
GenerateTemplateManifest (12)
Program.cs (8)
157sources.Add(new XElement("add", new XAttribute("key", cacheSource), new XAttribute("value", sharedCache))); 162mappings.Add(new XElement("packageSource", new XAttribute("key", cacheSource), 163cachePatterns.Select(pattern => new XElement("package", new XAttribute("pattern", pattern))))); 169new XAttribute("key", localSourceName), 170new XAttribute("value", localPackageFeed))); 172new XAttribute("key", localSourceName), 173builtIds.Order(StringComparer.OrdinalIgnoreCase).Select(id => new XElement("package", new XAttribute("pattern", id)))));
TemplateRestorePlan.cs (4)
147var project = new XElement("Project", new XAttribute("Sdk", "Microsoft.NET.Sdk"), 168project.Add(new XElement("ItemGroup", new XElement("PackageReference", new XAttribute("Include", name), new XAttribute("Version", value)))); 304new XElement("Project", new XAttribute("Path", $"{project.Name}/{project.Name}.csproj"))))).Save(solutionPath);
illink (4)
Infrastructure.Tests (51)
Hex1bNativePublishingTests.cs (21)
407new XAttribute("Include", source), 417new XAttribute("Include", unrelatedSource), 423new XAttribute("Include", "@(_ResolvedCopyLocalPublishAssets);@(RuntimeTargetsCopyLocalItems)"), 429new XAttribute("Include", Path.Combine(_workspace.Path, "duplicate", "OpenConsole.exe")), 440new XElement("Import", new XAttribute("Project", "Sdk.props"), new XAttribute("Sdk", "Microsoft.NET.Sdk")), 446new XElement("Import", new XAttribute("Project", "Sdk.targets"), new XAttribute("Sdk", "Microsoft.NET.Sdk")), 447new XElement("Import", new XAttribute("Project", Path.Combine(RepoRoot.Path, "src", "Aspire.Hosting", "buildTransitive", "Aspire.Hosting.targets"))), 448new XElement("Target", new XAttribute("Name", "ResolvePackageAssets"), nativeItems), 449new XElement("Target", new XAttribute("Name", "_ResolveCopyLocalAssetsForPublish"), 450new XAttribute("DependsOnTargets", "ResolvePackageAssets"), 452new XAttribute("Include", "@(NativeCopyLocalItems)"), 455new XElement("Target", new XAttribute("Name", "ComputeResolvedFilesToPublishList"), 456new XAttribute("DependsOnTargets", "_ResolveCopyLocalAssetsForPublish"), publishItems), 457new XElement("Target", new XAttribute("Name", "ComputeFilesToPublish"), 458new XAttribute("DependsOnTargets", "ComputeResolvedFilesToPublishList")), 459new XElement("Target", new XAttribute("Name", "CopyTestFiles"), 460new XAttribute("DependsOnTargets", "ComputeFilesToPublish"), 461new XElement("Copy", new XAttribute("SourceFiles", "@(ResolvedFileToPublish)"), 462new XAttribute("DestinationFiles", "@(ResolvedFileToPublish->'$(MSBuildProjectDirectory)/publish/%(RelativePath)')")))));
ResourceGeneratorMetadataTests.cs (2)
70neutralResources.Concat(otherResources).Select(path => new XElement("EmbeddedResource", new XAttribute("Include", path))), 71designers.Concat(otherSources).Select(path => new XElement("Compile", new XAttribute("Include", path)))),
Shared\TestTrxBuilder.cs (20)
39new XAttribute("total", testCases.Length), 40new XAttribute("executed", testCases.Length), 41new XAttribute("passed", testCases.Count(test => test.Outcome == "Passed")), 42new XAttribute("failed", testCases.Count(test => test.Outcome == "Failed")), 43new XAttribute("error", testCases.Count(test => test.Outcome == "Error")), 44new XAttribute("timeout", testCases.Count(test => test.Outcome == "Timeout")), 45new XAttribute("aborted", 0), 46new XAttribute("inconclusive", 0), 47new XAttribute("passedButRunAborted", 0), 48new XAttribute("notRunnable", 0), 49new XAttribute("notExecuted", 0))))); 96new XAttribute("name", testCase.DisplayName), 97new XAttribute("id", $"test-{index}"), 100new XAttribute("className", testCase.CanonicalTestName[..lastDotIndex]), 101new XAttribute("name", testCase.TestMethodName ?? testCase.CanonicalTestName[(lastDotIndex + 1)..]))); 108new XAttribute("testId", $"test-{index}"), 109new XAttribute("testName", testCase.DisplayName), 110new XAttribute("outcome", testCase.Outcome), 114testCase.StartTime is null ? null : new XAttribute("startTime", testCase.StartTime), 115testCase.EndTime is null ? null : new XAttribute("endTime", testCase.EndTime),
TemplateManifest\TemplateManifestBuildTargetTests.cs (2)
39new XElement("Target", new XAttribute("Name", "RefreshTemplatePackageInputsForCgManifest")), 40new XElement("Target", new XAttribute("Name", "ReplacePackageVersionOnTemplates")),
TemplateManifest\TemplateManifestTestEnvironment.cs (6)
53new XElement("add", new XAttribute("key", "external"), new XAttribute("value", ExternalFeed))), 56new XElement("packageSource", new XAttribute("key", "external"), 57new XElement("package", new XAttribute("pattern", "*")))), 126new XElement("dependency", new XAttribute("id", dependency.Name), 127new XAttribute("version", dependency.Version))))))).Save(stream);
Microsoft.AspNetCore.DataProtection (17)
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 (6)
388new XAttribute(VersionAttributeName, 1), 392new XAttribute(IdAttributeName, RevokeAllKeysValue)), 525new XAttribute(IdAttributeName, keyId), 526new XAttribute(VersionAttributeName, 1), 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)
1400assemblyIdentityAttributes.Add(new XAttribute("name", idealRemappingPartialAssemblyName.Name)); 1404assemblyIdentityAttributes.Add(new XAttribute("culture", String.IsNullOrEmpty(idealRemappingPartialAssemblyName.CultureName) ? "neutral" : idealRemappingPartialAssemblyName.CultureName)); 1407assemblyIdentityAttributes.Add(new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(publicKeyToken))); 1418new XAttribute("oldVersion", "0.0.0.0-" + newVerStr), 1419new 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)
69new XAttribute("id", component.GetMetadata("FileNameWithExtension")), 70new XAttribute("visible", "true"), 71new XAttribute("title", component.GetMetadata("Title")), 72new XAttribute("description", component.GetMetadata("Description")), 73new XElement("pkg-ref", new XAttribute("id", component.GetMetadata("FileNameWithExtension"))))); 90.Select(c => new XElement("line", new XAttribute("choice", c.Attribute("id").Value))); 94new XAttribute("id", component.GetMetadata("FileNameWithExtension")), 110optionsElement.Add(new XAttribute("hostArchitectures", hostArchitecture));
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\FinalizeInsertionVsixFile.cs (1)
101systemComponent = new XAttribute(systemComponentName, true);
Microsoft.DotNet.Build.Tasks.Workloads (15)
Msi\WixDocument.cs (8)
106new XAttribute("Id", id), 107new XAttribute("Value", value))); 115new XAttribute("Id", id))); 123new XAttribute("Id", id))); 141new XAttribute("Id", id), 142new XAttribute("Name", name)); 152new XAttribute("Root", root), 153new XAttribute("Key", key));
Msi\WixXmlExtensions.cs (7)
54new XAttribute("Value", value), 55new XAttribute("Type", type), 56new XAttribute("KeyPath", keyPath ? "yes" : "no")); 88new XAttribute("Key", key)); 116new XAttribute("Id", id)); 136new XAttribute("Id", id), 137new XAttribute("Name", name));
Microsoft.DotNet.HotReload.Watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
1151solutionElement.Add(new XElement("Project", new XAttribute("Path", projectPath)));
Microsoft.DotNet.PackageTesting (10)
VerifyClosure.cs (10)
365new XAttribute("Source", assembly.Name), 366new XAttribute("Target", reference.Name))); 374new XAttribute("Source", assembly.Name), 375new XAttribute("Target", moduleReference))); 385new XAttribute("Id", "native"), 386new XAttribute("Background", "Blue") 390new XAttribute("Id", "managed"), 391new XAttribute("Background", "Green") 405new XAttribute("Id", id), 406new XAttribute("Category", isNative ? "native": "managed")));
Microsoft.DotNet.SharedFramework.Sdk (23)
parent\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (10)
365new XAttribute("Source", assembly.Name), 366new XAttribute("Target", reference.Name))); 374new XAttribute("Source", assembly.Name), 375new XAttribute("Target", moduleReference))); 385new XAttribute("Id", "native"), 386new XAttribute("Background", "Blue") 390new XAttribute("Id", "managed"), 391new XAttribute("Background", "Green") 405new XAttribute("Id", id), 406new XAttribute("Category", isNative ? "native": "managed")));
src\CreateFrameworkListFile.cs (13)
68?.Select(item => new XAttribute(item.ItemSpec, item.GetMetadata("Value"))) 169new XAttribute("Type", type), 170new XAttribute("Path", path)); 174element.Add(new XAttribute("Language", analyzerLanguage)); 180new XAttribute("Culture", Path.GetFileName(Path.GetDirectoryName(path)))); 186element.Add(new XAttribute("DropFromSingleFile", "true")); 210new XAttribute("AssemblyName", f.AssemblyName.Name), 211new XAttribute("PublicKeyToken", publicKeyTokenHex), 212new XAttribute("AssemblyVersion", f.AssemblyName.Version)); 220element.Add(new XAttribute("FileVersion", f.FileVersion)); 230element.Add(new XAttribute("Profile", profile)); 237element.Add(new XAttribute("ReferencedByDefault", referencedByDefault)); 255element.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)
51new XAttribute("xmlns", XliffNS.NamespaceName), 52new XAttribute(XNamespace.Xmlns + "xsi", XsiNS.NamespaceName), 53new XAttribute("version", "1.2"), 54new XAttribute(XsiNS + "schemaLocation", $"{XliffNS.NamespaceName} xliff-core-1.2-transitional.xsd"), 56new XAttribute("datatype", "xml"), 57new XAttribute("source-language", "en"), 58new XAttribute("target-language", targetLanguage), 59new XAttribute("original", "_"), // placeholder will be replaced on first update 190new XAttribute("id", sourceNode.Id), 192new XElement(Target, new XAttribute("state", "new"), sourceNode.Source),
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (2)
Manifest.cs (2)
61new XAttribute(ElementNames.Name, entry.Name), 66var directory = new XElement(ElementNames.Directory, new XAttribute(ElementNames.Name, entry.Name));
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.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)
130new XAttribute("version", supportedRuntimeVersion)); 140new XAttribute("version", "v4.0"), 141new 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)
58new XAttribute("Include", element.Route),
GenerateStaticWebAssetsPropsFile.cs (1)
110new 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)
35root.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)
1165new XAttribute("Type", "http://schemas.microsoft.com/packaging/2010/07/manifest"), 1166new XAttribute("Target", $"/{path}"), 1167new XAttribute("Id", GenerateRelationshipId($"/{path}"))), 1169new XAttribute("Type", "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"), 1170new XAttribute("Target", $"/{psmdcpPath}"), 1171new XAttribute("Id", GenerateRelationshipId($"/{psmdcpPath}"))) 1190new XAttribute("Extension", "rels"), 1191new XAttribute("ContentType", "application/vnd.openxmlformats-package.relationships+xml")), 1193new XAttribute("Extension", "psmdcp"), 1194new XAttribute("ContentType", "application/vnd.openxmlformats-package.core-properties+xml")) 1200new XAttribute("Extension", extension), 1201new XAttribute("ContentType", "application/octet") 1209new XAttribute("PartName", file), 1210new XAttribute("ContentType", "application/octet") 1237new XAttribute(XNamespace.Xmlns + "dc", dcText), 1238new XAttribute(XNamespace.Xmlns + "dcterms", dctermsText), 1239new 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 (12)
System\Xml\Linq\XContainer.cs (4)
984e.AppendAttributeSkipNotify(new XAttribute(_aCache.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value)); 1043e.AppendAttributeSkipNotify(new XAttribute( 1120XAttribute a = new XAttribute(_aCache.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value); 1242XAttribute a = new XAttribute(
System\Xml\Linq\XElement.cs (5)
116AppendAttributeSkipNotify(new XAttribute(a)); 1230AppendAttribute(new XAttribute(name, value)); 1902if (a.parent != null) a = new XAttribute(a); 1909if (a.parent != null) a = new XAttribute(a); 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);
475 references to XAttribute
Aspire.Hosting.Azure.Provisioning.Generators (2)
AspireProvisioningProxyGenerator.cs (2)
2240private static XAttribute RewriteDocumentationAttribute( 2242XAttribute attribute,
dotnet-svcutil-lib (3)
Shared\MSBuildProj.cs (3)
469var itemAttribue = reference.Attributes().FirstOrDefault(item => item.Name == itemName); 491var itemAttribute = itemName.Attributes().FirstOrDefault(item => item.Name == "Include"); 505var itemAttribute = itemName.Attributes().FirstOrDefault(item => item.Name == "Include");
GenerateDocumentationAndConfigFiles (4)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
162var typeAttribute = element.Attribute(XmlAttribute_Type); 163var valueAttribute = element.Attribute(XmlAttribute_Value); 164var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
ilc (7)
RdXmlRootProvider.cs (7)
57var assemblyNameAttribute = assemblyElement.Attribute("Name"); 65var dynamicDegreeAttribute = assemblyElement.Attribute("Dynamic"); 92var typeNameAttribute = typeElement.Attribute("Name"); 99var dynamicDegreeAttribute = typeElement.Attribute("Dynamic"); 108var marshalStructureDegreeAttribute = typeElement.Attribute("MarshalStructure"); 117var marshalDelegateDegreeAttribute = typeElement.Attribute("MarshalDelegate"); 141var methodNameAttribute = methodElement.Attribute("Name");
Microsoft.AspNetCore.DataProtection (1)
XmlExtensions.cs (1)
22foreach (var attr in element.Attributes())
Microsoft.AspNetCore.OpenApi.SourceGenerators (3)
XmlComments\XmlComment.InheritDoc.cs (3)
144var crefAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.CrefAttributeName)); 145var pathAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)); 234if (typeParameterRef.Attribute(DocumentationCommentXmlNames.NameAttributeName) is XAttribute typeParamName)
Microsoft.AspNetCore.Rewrite (2)
IISUrlRewrite\UrlRewriteFileParser.cs (2)
256var attribute = element.Attribute(rewriteTag); 272var attribute = element.Attribute(rewriteTag);
Microsoft.Build.Tasks.Core (13)
AssemblyDependency\GenerateBindingRedirects.cs (6)
240var name = assemblyIdentity.Attribute("name"); 241var publicKeyToken = assemblyIdentity.Attribute("publicKeyToken"); 250var culture = assemblyIdentity.Attribute("culture"); 253var oldVersionAttribute = bindingRedirect.Attribute("oldVersion"); 254var newVersionAttribute = bindingRedirect.Attribute("newVersion"); 299var attributes = new List<XAttribute>(4)
AssemblyDependency\ResolveAssemblyReference.cs (1)
1398var assemblyIdentityAttributes = new List<XAttribute>(4);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (6)
430XAttribute includeAttribute = child.Attributes().FirstOrDefault(i => i.Name.LocalName.Equals("Include")); 444XAttribute namespaceAttribute = child.Attributes().FirstOrDefault(i => i.Name.LocalName.Equals("Namespace")); 486XAttribute languageAttribute = null; 487XAttribute sourceAttribute = null; 488XAttribute typeAttribute = null; 491foreach (XAttribute attribute in codeElement.Attributes().Where(i => !i.IsNamespaceDeclaration))
Microsoft.CodeAnalysis (3)
InternalUtilities\XmlUtilities.cs (2)
48IEnumerator<XAttribute> sourceAttributes = sourceElement.Attributes().GetEnumerator(); 49IEnumerator<XAttribute> targetAttributes = targetElement.Attributes().GetEnumerator();
RuleSet\RuleSetProcessor.cs (1)
255XAttribute attribute = node.Attribute(attributeName);
Microsoft.CodeAnalysis.Analyzers (4)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
162var typeAttribute = element.Attribute(XmlAttribute_Type); 163var valueAttribute = element.Attribute(XmlAttribute_Value); 164var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
162var typeAttribute = element.Attribute(XmlAttribute_Type); 163var valueAttribute = element.Attribute(XmlAttribute_Value); 164var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.CodeStyle (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
162var typeAttribute = element.Attribute(XmlAttribute_Type); 163var valueAttribute = element.Attribute(XmlAttribute_Value); 164var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.CSharp (8)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (8)
216foreach (XAttribute attribute in element.Attributes()) 257private static bool AttributeNameIs(XAttribute attribute, string name) 276XAttribute fileAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)); 277XAttribute pathAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)); 296XAttribute fileAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)); 297XAttribute pathAttr = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)); 495private void BindAndReplaceCref(XAttribute attribute, CSharpSyntaxNode originatingSyntax) 524private void BindName(XAttribute attribute, CSharpSyntaxNode originatingSyntax, bool isParameter, bool isTypeParameterRef)
Microsoft.CodeAnalysis.Features (5)
DocumentationComments\AbstractDocumentationCommentFormattingService.cs (5)
352foreach (var attribute in element.Attributes()) 372foreach (var attribute in element.Attributes()) 467var crefAttribute = element.Attribute(DocumentationCommentXmlNames.CrefAttributeName); 475var hrefAttribute = element.Attribute(DocumentationCommentXmlNames.HrefAttributeName); 482private static void AppendTextFromAttribute(FormatterState state, XAttribute attribute, string attributeNameToParse, SymbolDisplayPartKind kind)
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
147XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
162var typeAttribute = element.Attribute(XmlAttribute_Type); 163var valueAttribute = element.Attribute(XmlAttribute_Value); 164var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.VisualBasic (8)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (8)
381Dim nameAttribute As XAttribute = Nothing 436Private Shared Function AttributeNameIs(attribute As XAttribute, name As String) As Boolean 448Dim fileAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)) 449Dim pathAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)) 458Dim fileAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.FileAttributeName)) 459Dim pathAttr As XAttribute = includeElement.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)) 606Private Sub BindAndReplaceCref(attribute As XAttribute, currentXmlFilePath As String) 731Private Function BindName(attribute As XAttribute,
Microsoft.CodeAnalysis.Workspaces (7)
Log\WorkspaceStructureLogger.cs (1)
242var aliasesAttribute = new XAttribute("aliases", string.Join(",", reference.Properties.Aliases));
Shared\Extensions\ISymbolExtensions.cs (3)
346var crefAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.CrefAttributeName)); 347var pathAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)); 428if (typeParameterRef.Attribute(DocumentationCommentXmlNames.NameAttributeName) is XAttribute typeParamName)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
162var typeAttribute = element.Attribute(XmlAttribute_Type); 163var valueAttribute = element.Attribute(XmlAttribute_Value); 164var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.DotNet.Arcade.Sdk (2)
src\ExtractNgenMethodList.cs (2)
64var flagsInt = child.Attribute("flagsInt"); 65var name = child.Attribute("name");
Microsoft.DotNet.Build.Manifest (2)
BuildIdentity.cs (1)
255public IEnumerable<XAttribute> ToXmlAttributes() => Attributes
XElementParsingExtensions.cs (1)
29public static XAttribute[] CreateXmlAttributes(
Microsoft.DotNet.Build.Tasks.Installers (1)
src\StabilizeWixFileId.cs (1)
90XAttribute nameAttribute = matchingFileElements[0].Attribute("Id");
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
220var versionAttribute = file.Attribute("Version");
Microsoft.DotNet.Build.Tasks.VisualStudio (2)
Vsix\FinalizeInsertionVsixFile.cs (2)
84var experimental = installationElement.Attribute("Experimental"); 93var systemComponent = installationElement.Attribute(systemComponentName);
Microsoft.DotNet.NuGetRepack.Tasks (4)
src\NuGetVersionUpdater.cs (3)
133var xmlNsAttribute = nuspecXml.Root.Attributes("xmlns").SingleOrDefault(); 262var name = packageType.Attribute("name"); 294var versionRangeAttribute = dependency.Attribute("version");
src\ReplacePackageParts.cs (1)
143var xmlNsAttribute = nuspecXml.Root.Attributes("xmlns").SingleOrDefault();
Microsoft.DotNet.SharedFramework.Sdk (1)
src\CreateFrameworkListFile.cs (1)
67XAttribute[] rootAttributes = RootAttributes
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\XmlParsingHelpers.cs (2)
20public static XAttribute ToXAttributeIfNotNull(this object value, string name) => 23public static XAttribute ToXAttributeIfTrue(this bool value, string name) =>
Microsoft.DotNet.XliffTasks (9)
Model\TranslatableXmlDocument.cs (2)
45private readonly XAttribute _attribute; 47public TranslatableXmlAttribute(string id, string source, string note, XAttribute attribute)
Model\VsctDocument.cs (1)
81XAttribute hrefAttribute = imageTag.Attribute("href");
Model\XamlRuleDocument.cs (4)
71foreach (XAttribute? attribute in element.Attributes()) 145private static string GenerateIdForPropertyMetadata(XElement element, XAttribute? attribute = null) 210private static string XmlName(XObject container) => container is XElement element ? XmlName(element) : XmlName((XAttribute)container); 218private static string XmlName(XAttribute attribute) => attribute.Name.LocalName;
Model\XElementExtensions.cs (1)
73XAttribute stateAttribute = targetElement.Attribute("state");
Model\XlfDocument.cs (1)
91XAttribute originalAttribute = fileElement.Attribute("original");
Microsoft.Maui.Resizetizer (13)
GeneratePackageAppxManifest.cs (12)
92 var attr = identity.Attribute(xname); 103 var attr = identity.Attribute(xname); 201 var attr = visual.Attribute(xname); 209 var attr = visual.Attribute(xname); 218 var attr = visual.Attribute(xname); 228 var attr = visual.Attribute(xname); 240 var attr = visual.Attribute(xname); 264 var attr = tile.Attribute(xname); 276 var attr = tile.Attribute(xname); 288 var attr = tile.Attribute(xname); 302 var attr = tile.Attribute(xname); 338 var attr = splash.Attribute(xname);
GenerateTizenManifest.cs (1)
192 var attr = element.Attribute(attrName);
Microsoft.NET.Build.Tasks (2)
StoreArtifactParser.cs (2)
31var pkgname = pkginfo.Attribute("Id"); 32var version = pkginfo.Attribute("Version");
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
CreateBlazorTrimmerRootDescriptorFile.cs (1)
50var attributes = new List<XAttribute>
Microsoft.NET.Sdk.Publish.Tasks (2)
WebConfigTransform.cs (2)
113var argumentsAttribute = aspNetCoreElement.Attribute("arguments"); 144var hostingModelAttributeValue = aspNetCoreElement.Attribute("hostingModel");
Microsoft.TestPlatform.Build (1)
Tasks\TestTaskUtils.cs (1)
320foreach (var attribute in logger.Attributes())
netstandard (1)
netstandard.cs (1)
2266[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XAttribute))]
NuGet.Configuration (7)
Settings\SettingElement.cs (5)
107foreach (var existingAttribute in element.Attributes()) 245foreach (var attribute in element.Attributes()) 260var attribute = element.Attribute(requireAttribute); 274var attribute = element.Attribute(attributeValues.Key); 288var attribute = element.Attribute(attributeValues.Key);
Utility\XElementUtility.cs (2)
14var attr = element.Attribute(localName); 20var attr = element.Attribute(XName.Get(localName, namespaceName));
NuGet.PackageManagement (10)
Utility\XElementExtensions.cs (10)
20XAttribute attr; 68foreach (var a in attributesToRemove.ToList()) 121foreach (var targetAttribute in target.Attributes()) 123var sourceAttribute = source.Attribute(targetAttribute.Name); 224private static int CountMatches(XElement left, XElement right, Func<XAttribute, XAttribute, bool> matcher) 237foreach (var targetAttr in target.Attributes()) 250public static void RemoveAttributes(this XElement element, Func<XAttribute, bool> condition) 357private static bool AttributeEquals(XAttribute source, XAttribute target)
NuGet.Packaging (29)
Core\NuspecCoreReader.cs (1)
42var versionNode = node.Attribute(XName.Get(Version));
Core\NuspecCoreReaderBase.cs (1)
104var node = MetadataNode.Attribute(XName.Get(MinClientVersion));
Core\NuspecUtility.cs (3)
73var nameAttribute = node.Attribute(XName.Get(Name)); 83var versionAttribute = node.Attribute(XName.Get(Version)); 182var attribute = element.Attribute(XName.Get(attributeName));
NuspecReader.cs (1)
629var attribute = element.Attribute(XName.Get(attributeName));
PackageCreation\Authoring\ManifestReader.cs (5)
411var srcElement = file.Attribute("src"); 435var repositoryType = element.Attribute("type"); 436var repositoryUrl = element.Attribute("url"); 437var repositoryBranch = element.Attribute("branch"); 438var repositoryCommit = element.Attribute("commit");
PackageCreation\Extensions\XElementExtensions.cs (7)
16XAttribute? attr; 44foreach (var a in attributesToRemove.ToList()) 112private static int CountMatches(XElement left, XElement right, Func<XAttribute, XAttribute, bool> matcher) 131foreach (var targetAttr in target.Attributes()) 144private static bool AttributeEquals(XAttribute? source, XAttribute? target)
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (6)
212var attributes = new List<XAttribute>(); 264var attributes = new List<XAttribute?> 278var attributes = new List<XAttribute?>(); 291var attributeList = new List<XAttribute>(); 334var attributes = new List<XAttribute?>(); 345private static XAttribute? GetXAttributeFromNameAndValue(string name, object? value)
PackagesConfig.cs (1)
27var attribute = node.Attributes(XName.Get(name)).FirstOrDefault();
PackagesConfigReader.cs (1)
108var node = _doc.Root!.Attribute(XName.Get(PackagesConfig.MinClientAttributeName));
PackagesConfigWriter.cs (2)
132var minClientVersionAttribute = new XAttribute(XName.Get(PackagesConfig.MinClientAttributeName), _minClientVersion.ToNormalizedString()); 486var attribute = new XAttribute(name, newEntryNode.Attribute(name)!.Value);
Rules\InvalidUndottedFrameworkRule.cs (1)
281var attribute = element.Attribute(XName.Get(attributeName));
NuGet.Protocol (1)
LegacyFeed\LegacyFeedCapabilityResourceV2Feed.cs (1)
144var packageEntityTypeAttribute = result.EntitySet?.Attribute("EntityType");
Roslyn.Diagnostics.Analyzers (4)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
162var typeAttribute = element.Attribute(XmlAttribute_Type); 163var valueAttribute = element.Attribute(XmlAttribute_Value); 164var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
sdk-tasks (1)
OverrideAndCreateBundledNETCoreAppPackageVersion.cs (1)
115foreach (var attr in item2.Attributes())
System.ComponentModel.TypeConverter (13)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (13)
53else if (typeof(T) == typeof(XAttribute)) 146private XDeferredSingleton<XAttribute>? _value; 147private XAttribute? _changeState; 155return _value = new XDeferredSingleton<XAttribute>((e, n) => e.Attribute(n), (component as XElement)!, null); 165XAttribute? a = sender as XAttribute; 172a = sender as XAttribute; 189XAttribute? a = sender as XAttribute; 457internal sealed class XAttributeValuePropertyDescriptor : XPropertyDescriptor<XAttribute, string> 459private XAttribute? _attribute; 472_attribute = component as XAttribute; 480_attribute = component as XAttribute;
System.Private.Xml.Linq (282)
System\Xml\Linq\Extensions.cs (14)
16/// Returns all of the <see cref="XAttribute"/>s for each <see cref="XElement"/> of 20/// An <see cref="IEnumerable"/> of <see cref="XAttribute"/> containing the XML 24public static IEnumerable<XAttribute> Attributes(this IEnumerable<XElement?> source) 32/// Returns the <see cref="XAttribute"/>s that have a matching <see cref="XName"/>. Each 33/// <see cref="XElement"/>'s <see cref="XAttribute"/>s in the target <see cref="IEnumerable"/> 37/// An <see cref="IEnumerable"/> of <see cref="XAttribute"/> containing the XML 41public static IEnumerable<XAttribute> Attributes(this IEnumerable<XElement?> source, XName? name) 45return name != null ? GetAttributes(source, name) : XAttribute.EmptySequence; 308/// Removes each <see cref="XAttribute"/> represented in this <see cref="IEnumerable"/> of 309/// <see cref="XAttribute"/>. Note that this method uses snapshot semantics (copies the 312public static void Remove(this IEnumerable<XAttribute?> source) 317XAttribute?[] attributes = EnumerableHelpers.ToArray(source, out count); 341private static IEnumerable<XAttribute> GetAttributes(IEnumerable<XElement?> source, XName? name) 347XAttribute? a = e.lastAttr;
System\Xml\Linq\XAttribute.cs (113)
26public static IEnumerable<XAttribute> EmptySequence 30return Array.Empty<XAttribute>(); 34internal XAttribute? next; 39/// Initializes a new instance of the <see cref="XAttribute"/> class. 42/// Initializes a new instance of the <see cref="XAttribute"/> class from 69/// <param name="other"><see cref="XAttribute"/> object to copy from.</param> 71/// Thrown if the specified <see cref="XAttribute"/> is null. 73public XAttribute(XAttribute other) 112public XAttribute? NextAttribute 138public XAttribute? PreviousAttribute 143XAttribute a = ((XElement)parent).lastAttr!; 187/// Sets the value of this <see cref="XAttribute"/>. 207/// Override for <see cref="ToString()"/> on <see cref="XAttribute"/> 225/// Cast the value of this <see cref="XAttribute"/> to a <see cref="string"/>. 228/// The <see cref="XAttribute"/> to cast to <see cref="string"/>. 231/// The content of this <see cref="XAttribute"/> as a <see cref="string"/>. 235public static explicit operator string?(XAttribute? attribute) 242/// Cast the value of this <see cref="XAttribute"/> to a <see cref="bool"/>. 245/// The <see cref="XAttribute"/> to cast to <see cref="bool"/>. 248/// The content of this <see cref="XAttribute"/> as a <see cref="bool"/>. 254public static explicit operator bool(XAttribute attribute) 262/// Cast the value of this <see cref="XAttribute"/> to a <see cref="bool"/>?. 265/// The <see cref="XAttribute"/> to cast to <see cref="bool"/>?. Can be null. 268/// The content of this <see cref="XAttribute"/> as a <see cref="bool"/>?. 272public static explicit operator bool?(XAttribute? attribute) 279/// Cast the value of this <see cref="XAttribute"/> to an <see cref="int"/>. 282/// The <see cref="XAttribute"/> to cast to <see cref="int"/>. 285/// The content of this <see cref="XAttribute"/> as an <see cref="int"/>. 291public static explicit operator int(XAttribute attribute) 299/// Cast the value of this <see cref="XAttribute"/> to an <see cref="int"/>?. 302/// The <see cref="XAttribute"/> to cast to <see cref="int"/>?. Can be null. 305/// The content of this <see cref="XAttribute"/> as an <see cref="int"/>?. 309public static explicit operator int?(XAttribute? attribute) 316/// Cast the value of this <see cref="XAttribute"/> to an <see cref="uint"/>. 319/// The <see cref="XAttribute"/> to cast to <see cref="uint"/>. 322/// The content of this <see cref="XAttribute"/> as an <see cref="uint"/>. 328public static explicit operator uint(XAttribute attribute) 336/// Cast the value of this <see cref="XAttribute"/> to an <see cref="uint"/>?. 339/// The <see cref="XAttribute"/> to cast to <see cref="uint"/>?. Can be null. 342/// The content of this <see cref="XAttribute"/> as an <see cref="uint"/>?. 346public static explicit operator uint?(XAttribute? attribute) 353/// Cast the value of this <see cref="XAttribute"/> to a <see cref="long"/>. 356/// The <see cref="XAttribute"/> to cast to <see cref="long"/>. 359/// The content of this <see cref="XAttribute"/> as a <see cref="long"/>. 365public static explicit operator long(XAttribute attribute) 373/// Cast the value of this <see cref="XAttribute"/> to a <see cref="long"/>?. 376/// The <see cref="XAttribute"/> to cast to <see cref="long"/>?. Can be null. 379/// The content of this <see cref="XAttribute"/> as a <see cref="long"/>?. 383public static explicit operator long?(XAttribute? attribute) 390/// Cast the value of this <see cref="XAttribute"/> to an <see cref="ulong"/>. 393/// The <see cref="XAttribute"/> to cast to <see cref="ulong"/>. 396/// The content of this <see cref="XAttribute"/> as an <see cref="ulong"/>. 402public static explicit operator ulong(XAttribute attribute) 410/// Cast the value of this <see cref="XAttribute"/> to an <see cref="ulong"/>?. 413/// The <see cref="XAttribute"/> to cast to <see cref="ulong"/>?. Can be null. 416/// The content of this <see cref="XAttribute"/> as an <see cref="ulong"/>?. 420public static explicit operator ulong?(XAttribute? attribute) 427/// Cast the value of this <see cref="XAttribute"/> to a <see cref="float"/>. 430/// The <see cref="XAttribute"/> to cast to <see cref="float"/>. 433/// The content of this <see cref="XAttribute"/> as a <see cref="float"/>. 439public static explicit operator float(XAttribute attribute) 447/// Cast the value of this <see cref="XAttribute"/> to a <see cref="float"/>?. 450/// The <see cref="XAttribute"/> to cast to <see cref="float"/>?. Can be null. 453/// The content of this <see cref="XAttribute"/> as a <see cref="float"/>?. 457public static explicit operator float?(XAttribute? attribute) 464/// Cast the value of this <see cref="XAttribute"/> to a <see cref="double"/>. 467/// The <see cref="XAttribute"/> to cast to <see cref="double"/>. 470/// The content of this <see cref="XAttribute"/> as a <see cref="double"/>. 476public static explicit operator double(XAttribute attribute) 484/// Cast the value of this <see cref="XAttribute"/> to a <see cref="double"/>?. 487/// The <see cref="XAttribute"/> to cast to <see cref="double"/>?. Can be null. 490/// The content of this <see cref="XAttribute"/> as a <see cref="double"/>?. 494public static explicit operator double?(XAttribute? attribute) 501/// Cast the value of this <see cref="XAttribute"/> to a <see cref="decimal"/>. 504/// The <see cref="XAttribute"/> to cast to <see cref="decimal"/>. 507/// The content of this <see cref="XAttribute"/> as a <see cref="decimal"/>. 513public static explicit operator decimal(XAttribute attribute) 521/// Cast the value of this <see cref="XAttribute"/> to a <see cref="decimal"/>?. 524/// The <see cref="XAttribute"/> to cast to <see cref="decimal"/>?. Can be null. 527/// The content of this <see cref="XAttribute"/> as a <see cref="decimal"/>?. 531public static explicit operator decimal?(XAttribute? attribute) 538/// Cast the value of this <see cref="XAttribute"/> to a <see cref="DateTime"/>. 541/// The <see cref="XAttribute"/> to cast to <see cref="DateTime"/>. 544/// The content of this <see cref="XAttribute"/> as a <see cref="DateTime"/>. 550public static explicit operator DateTime(XAttribute attribute) 558/// Cast the value of this <see cref="XAttribute"/> to a <see cref="DateTime"/>?. 561/// The <see cref="XAttribute"/> to cast to <see cref="DateTime"/>?. Can be null. 564/// The content of this <see cref="XAttribute"/> as a <see cref="DateTime"/>?. 568public static explicit operator DateTime?(XAttribute? attribute) 575/// Cast the value of this <see cref="XAttribute"/> to a <see cref="DateTimeOffset"/>. 578/// The <see cref="XAttribute"/> to cast to <see cref="DateTimeOffset"/>. 581/// The content of this <see cref="XAttribute"/> as a <see cref="DateTimeOffset"/>. 587public static explicit operator DateTimeOffset(XAttribute attribute) 595/// Cast the value of this <see cref="XAttribute"/> to a <see cref="DateTimeOffset"/>?. 598/// The <see cref="XAttribute"/> to cast to <see cref="DateTimeOffset"/>?. Can be null. 601/// The content of this <see cref="XAttribute"/> as a <see cref="DateTimeOffset"/>?. 605public static explicit operator DateTimeOffset?(XAttribute? attribute) 612/// Cast the value of this <see cref="XAttribute"/> to a <see cref="TimeSpan"/>. 615/// The <see cref="XAttribute"/> to cast to <see cref="TimeSpan"/>. 618/// The content of this <see cref="XAttribute"/> as a <see cref="TimeSpan"/>. 624public static explicit operator TimeSpan(XAttribute attribute) 632/// Cast the value of this <see cref="XAttribute"/> to a <see cref="TimeSpan"/>?. 635/// The <see cref="XAttribute"/> to cast to <see cref="TimeSpan"/>?. Can be null. 638/// The content of this <see cref="XAttribute"/> as a <see cref="TimeSpan"/>?. 642public static explicit operator TimeSpan?(XAttribute? attribute) 649/// Cast the value of this <see cref="XAttribute"/> to a <see cref="Guid"/>. 652/// The <see cref="XAttribute"/> to cast to <see cref="Guid"/>. 655/// The content of this <see cref="XAttribute"/> as a <see cref="Guid"/>. 661public static explicit operator Guid(XAttribute attribute) 669/// Cast the value of this <see cref="XAttribute"/> to a <see cref="Guid"/>?. 672/// The <see cref="XAttribute"/> to cast to <see cref="Guid"/>?. Can be null. 675/// The content of this <see cref="XAttribute"/> as a <see cref="Guid"/>?. 679public static explicit operator Guid?(XAttribute? attribute)
System\Xml\Linq\XContainer.cs (10)
155XAttribute? a = content as XAttribute; 340/// include <see cref="XAttribute"/>s. 345/// that the content does not include <see cref="XAttribute"/>s. 459internal virtual void AddAttribute(XAttribute a) 463internal virtual void AddAttributeSkipNotify(XAttribute a) 482XAttribute? a = content as XAttribute; 1120XAttribute a = new XAttribute(_aCache.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value); 1242XAttribute a = new XAttribute(
System\Xml\Linq\XDocument.cs (2)
863internal override void AddAttribute(XAttribute a) 868internal override void AddAttributeSkipNotify(XAttribute a)
System\Xml\Linq\XElement.cs (42)
50internal XAttribute? lastAttr; 110XAttribute? a = other.lastAttr; 215public XAttribute? FirstAttribute 259public XAttribute? LastAttribute 363/// Returns the <see cref="XAttribute"/> associated with this <see cref="XElement"/> that has this 367/// The <see cref="XName"/> of the <see cref="XAttribute"/> to get. 370/// The <see cref="XAttribute"/> with the <see cref="XName"/> passed in. If there is no <see cref="XAttribute"/> 373public XAttribute? Attribute(XName name) 375XAttribute? a = lastAttr; 388/// Returns the <see cref="XAttribute"/> associated with this <see cref="XElement"/>. Optionally 389/// an <see cref="XName"/> can be given to target a specific <see cref="XAttribute"/>(s). 392/// Returns all of the <see cref="XAttribute"/>s associated with this <see cref="XElement"/>. 396/// An <see cref="IEnumerable"/> of <see cref="XAttribute"/> containing all of the <see cref="XAttribute"/>s 399public IEnumerable<XAttribute> Attributes() 405/// Returns the <see cref="XAttribute"/>(s) associated with this <see cref="XElement"/> that has the passed 410/// The <see cref="XName"/> of the targeted <see cref="XAttribute"/>. 413/// The <see cref="XAttribute"/>(s) with the matching 415public IEnumerable<XAttribute> Attributes(XName? name) 417return name != null ? GetAttributes(name) : XAttribute.EmptySequence; 504XAttribute? a = e.lastAttr; 939XAttribute a = lastAttr.next!; 1200/// <seealso cref="XAttribute.SetValue"/> 1217XAttribute? a = Attribute(name); 1240/// <seealso cref="XAttribute.SetValue"/> 1277/// <seealso cref="XAttribute.SetValue"/> 1899internal override void AddAttribute(XAttribute a) 1906internal override void AddAttributeSkipNotify(XAttribute a) 1913internal void AppendAttribute(XAttribute a) 1921internal void AppendAttributeSkipNotify(XAttribute a) 1938XAttribute? a1 = lastAttr; 1939XAttribute? a2 = e.lastAttr; 1964private IEnumerable<XAttribute> GetAttributes(XName? name) 1966XAttribute? a = lastAttr; 1983XAttribute? a = e.lastAttr; 2002XAttribute? a = lastAttr; 2071XAttribute a = new XAttribute(XNamespace.Get(r.Prefix.Length == 0 ? string.Empty : r.NamespaceURI).GetName(r.LocalName), r.Value); 2082internal void RemoveAttribute(XAttribute a) 2086XAttribute? p = lastAttr!, n; 2106XAttribute a = lastAttr; 2109XAttribute next = a.next!;
System\Xml\Linq\XLinq.cs (12)
110if (content is XAttribute) throw new ArgumentException(SR.Argument_AddAttribute); 312XAttribute? a = e.lastAttr; 330XAttribute? a = e.lastAttr; 375XAttribute? a = e.lastAttr; 394XAttribute? a = e.lastAttr; 530private readonly List<XAttribute> _attributes; 537_attributes = new List<XAttribute>(); 548foreach (XAttribute a in _attributes) 574foreach (XAttribute a in _attributes) 598XAttribute? a = content as XAttribute; 625private void WriteAttribute(XAttribute a)
System\Xml\Linq\XNode.cs (1)
27/// Note that an <see cref="XAttribute"/> is not an <see cref="XNode"/>.
System\Xml\Linq\XNodeBuilder.cs (1)
91XAttribute a = new XAttribute(_attrName!, _attrValue!);
System\Xml\Linq\XNodeReader.cs (41)
48XAttribute? a = e.lastAttr; 209XAttribute? a = _source as XAttribute; 256XAttribute? a = _source as XAttribute; 329XAttribute? a = _source as XAttribute; 370return ((XAttribute)o).Value; 402XAttribute? a = e.Attribute(name); 428XAttribute? a = e.Attribute(name); 475XAttribute? a = e.lastAttr; 530XAttribute? a = e.lastAttr; 565XAttribute? a = e.lastAttr; 617XAttribute? a = e.lastAttr; 664XAttribute? a = e.lastAttr; 701XAttribute? a = e.lastAttr; 730XAttribute? a = 731_source as XAttribute ?? 732_parent as XAttribute; 812XAttribute? a = 813_source as XAttribute ?? 814_parent as XAttribute; 868XAttribute? a = _source as XAttribute; 1091XAttribute? a = _source as XAttribute; 1096a = _parent as XAttribute; 1116XAttribute? a = _source as XAttribute; 1126a = _parent as XAttribute; 1176XAttribute? a = _source as XAttribute; 1231private bool ReadIntoAttribute(XAttribute a) 1238private bool ReadOverAttribute(XAttribute a, bool skipContent) 1286XAttribute? parent = _parent as XAttribute; 1307private bool IsDuplicateNamespaceAttribute(XAttribute candidateAttribute) 1320private bool IsDuplicateNamespaceAttributeInner(XAttribute candidateAttribute) 1347XAttribute? a = element.lastAttr; 1384private XAttribute? GetFirstNonDuplicateNamespaceAttribute(XAttribute candidate)
System\Xml\Schema\XNodeValidator.cs (13)
56if (((XAttribute)source).IsNamespaceDeclaration) goto default; 79ValidateAttribute((XAttribute)source); 175XAttribute? a = e.lastAttr; 202XAttribute? a = e.lastAttr; 246private void ValidateAttribute(XAttribute a) 261XAttribute? a = e.lastAttr; 446/// Gets the schema information that has been assigned to the <see cref="XAttribute"/> as a result of schema validation. 449public static IXmlSchemaInfo? GetSchemaInfo(this XAttribute source) 528/// Validate a <see cref="XAttribute"/> 538public static void Validate(this XAttribute source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler? validationEventHandler) 544/// Validate a <see cref="XAttribute"/> 554/// <param name="addSchemaInfo">If enabled the <see cref="XAttribute"/> is augmented with PSVI 557public static void Validate(this XAttribute source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler? validationEventHandler, bool addSchemaInfo)
System\Xml\XPath\XNodeNavigator.cs (33)
41private static XAttribute? s_XmlNamespaceDeclaration; 87foreach (XAttribute attribute in element.Attributes()) 139XAttribute? a = _source as XAttribute; 181XAttribute? a = _source as XAttribute; 209XAttribute attribute = (XAttribute)_source; 242XAttribute? a = _source as XAttribute; 277return ((XAttribute)_source).Value; 328foreach (XAttribute attribute in e.Attributes()) 387foreach (XAttribute attribute in e.Attributes()) 421XAttribute? a = null; 469XAttribute? a = GetFirstNamespaceDeclarationGlobal(e); 570XAttribute? currentAttribute = _source as XAttribute; 576for (XAttribute? attribute = currentAttribute.NextAttribute; attribute != null; attribute = attribute.NextAttribute) 591XAttribute? a = _source as XAttribute; 762private static bool IsXmlNamespaceDeclaration(XAttribute a) 772private static XAttribute? GetFirstNamespaceDeclarationGlobal(XElement e) 777XAttribute? a = GetFirstNamespaceDeclarationLocal(ce); 787private static XAttribute? GetFirstNamespaceDeclarationLocal(XElement e) 789foreach (XAttribute attribute in e.Attributes()) 799private static XAttribute? GetNextNamespaceDeclarationGlobal(XAttribute a) 806XAttribute? next = GetNextNamespaceDeclarationLocal(a); 819private static XAttribute? GetNextNamespaceDeclarationLocal(XAttribute a) 826XAttribute? ca = a; 839private static XAttribute GetXmlNamespaceDeclaration() 848private static bool HasNamespaceDeclarationInScope(XAttribute a, XElement e)
System.Xml.Linq (1)
System.Xml.Linq.cs (1)
8[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XAttribute))]
System.Xml.XDocument (1)
src\runtime\artifacts\obj\System.Xml.XDocument\Release\net11.0\System.Xml.XDocument.Forwards.cs (1)
7[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XAttribute))]