840 instantiations of XAttribute
Aspire.Hosting.Maui (21)
Utilities\MauiEnvironmentHelper.cs (21)
100new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"), 101new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')") 108itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={value}"))); 115new XAttribute("Name", "AspireGenerateAndroidEnvironmentFiles"), 116new XAttribute("BeforeTargets", "_GenerateEnvironmentFiles"), 117new XAttribute("Condition", "'@(_GeneratedAndroidEnvironment)' != ''") 123new XAttribute("File", "$(IntermediateOutputPath)__aspire_environment__.txt"), 124new XAttribute("Lines", "@(_GeneratedAndroidEnvironment)"), 125new XAttribute("Overwrite", "True"), 126new XAttribute("WriteOnlyWhenDifferent", "True") 132new XElement("AndroidEnvironment", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 138new XElement("FileWrites", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt")) 144new XAttribute("Files", "$(_AndroidStampDirectory)_GeneratePackageManagerJava.stamp") 283new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"), 284new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')") 298new XAttribute("Include", $"{key}={encodedValue}"))); 306new XAttribute("Name", "AspireLogMlaunchEnvironmentVariables"), 307new XAttribute("AfterTargets", "PrepareForBuild"), 308new XAttribute("Condition", "'@(MlaunchEnvironmentVariables)' != ''"), 311new XAttribute("Importance", "High"), 312new XAttribute("Text", "Aspire forwarding mlaunch environment variables: @(MlaunchEnvironmentVariables, ', ')")
BuildBoss (4)
InternalsVisibleTo.cs (4)
31element.Add(new XAttribute("Include", TargetAssembly)); 36element.Add(new XAttribute("Key", PublicKey)); 41element.Add(new XAttribute("LoadsWithinVisualStudio", LoadsWithinVisualStudio)); 46element.Add(new XAttribute("WorkItem", WorkItem));
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));
EndToEnd.Tests (6)
GivenDotNetUsesMSBuild.cs (4)
56new XAttribute("Include", "dotnet-portable"), 57new XAttribute("Version", "1.0.0"))); 90new XAttribute("Include", "dotnet-prefercliruntime"), 91new XAttribute("Version", "1.0.0")));
Utilities\TestProjectCreator.cs (2)
64new XElement(ns + "PackageReference", new XAttribute("Include", PackageName)))); 69new XElement(ns + "FrameworkReference", new XAttribute("Include", PackageName))));
IIS.LongTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1411new XAttribute("protocol", "https"), 1412new XAttribute("bindingInformation", $":{sslPort}:localhost")), 1414new XAttribute("protocol", "https"), 1415new XAttribute("bindingInformation", $":{anotherSslPort}:localhost")));
IIS.NewHandler.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1411new XAttribute("protocol", "https"), 1412new XAttribute("bindingInformation", $":{sslPort}:localhost")), 1414new XAttribute("protocol", "https"), 1415new XAttribute("bindingInformation", $":{anotherSslPort}:localhost")));
IIS.NewShim.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1411new XAttribute("protocol", "https"), 1412new XAttribute("bindingInformation", $":{sslPort}:localhost")), 1414new XAttribute("protocol", "https"), 1415new XAttribute("bindingInformation", $":{anotherSslPort}:localhost")));
IISExpress.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1411new XAttribute("protocol", "https"), 1412new XAttribute("bindingInformation", $":{sslPort}:localhost")), 1414new XAttribute("protocol", "https"), 1415new XAttribute("bindingInformation", $":{anotherSslPort}:localhost")));
illink (4)
Metrics (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Metrics.Legacy (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.AspNetCore.App.Analyzers.Test (9)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (9)
266new XAttribute("Name", parameter.Name), 267new XAttribute("IsCatchAll", parameter.IsCatchAll), 268new XAttribute("IsOptional", parameter.IsOptional), 269new XAttribute("EncodeSlashes", parameter.EncodeSlashes)); 272parameterElement.Add(new XAttribute("DefaultValue", parameter.DefaultValue)); 286new XAttribute("Message", d.Message), 287new XAttribute("Span", d.Span), 291=> new("Text", text.ToString(span)); 310element.Add(new XAttribute("value", token.Value));
Microsoft.AspNetCore.Authentication.Test (9)
CookieTests.cs (4)
1978xml.Add(result.Ticket.Principal.Claims.Select(claim => new XElement("claim", new XAttribute("type", claim.Type), new XAttribute("value", claim.Value)))); 1982xml.Add(result.Ticket.Properties.Items.Select(extra => new XElement("extra", new XAttribute("type", extra.Key), new XAttribute("value", extra.Value))));
TestExtensions.cs (5)
55new XElement("claim", new XAttribute("type", claim.Type), 56new XAttribute("value", claim.Value), 57new XAttribute("issuer", claim.Issuer)))); 73xml.Add(new XElement("token", new XAttribute("name", token.Name), 74new XAttribute("value", token.Value)));
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.AspNetCore.Identity.InMemory.Test (4)
FunctionalTest.cs (4)
412xml.Add(result.Principal.Claims.Select(claim => new XElement("claim", new XAttribute("type", claim.Type), new XAttribute("value", claim.Value)))); 416xml.Add(result.Properties.Items.Select(extra => new XElement("extra", new XAttribute("type", extra.Key), new XAttribute("value", extra.Value))));
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
XElementExtensions.cs (2)
38existing = new XElement(name, new XAttribute(attribute, attributeValue)); 47var innerElement = new XElement(name, new XAttribute(attribute, attributeValue));
Microsoft.Build.Tasks.Core (15)
AssemblyDependency\GenerateBindingRedirects.cs (9)
97new XAttribute("name", redirect.Key.Name), 98new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(redirect.Key.GetPublicKeyToken())), 99new XAttribute("culture", String.IsNullOrEmpty(redirect.Key.CultureName) ? "neutral" : redirect.Key.CultureName)), 102new XAttribute("oldVersion", "0.0.0.0-" + redirect.Value), 103new XAttribute("newVersion", redirect.Value)))); 296new XAttribute("name", newName), 297new XAttribute( 300new XAttribute( 306attributes.Add(new XAttribute("processorArchitecture", newProcessorArchitecture.ToString()));
AssemblyDependency\ResolveAssemblyReference.cs (5)
1251assemblyIdentityAttributes.Add(new XAttribute("name", idealRemappingPartialAssemblyName.Name)); 1255assemblyIdentityAttributes.Add(new XAttribute("culture", String.IsNullOrEmpty(idealRemappingPartialAssemblyName.CultureName) ? "neutral" : idealRemappingPartialAssemblyName.CultureName)); 1258assemblyIdentityAttributes.Add(new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(publicKeyToken))); 1269new XAttribute("oldVersion", "0.0.0.0-" + newVerStr), 1270new XAttribute("newVersion", newVerStr))));
CombineTargetFrameworkInfoProperties.cs (1)
49new("TargetFramework", new XAttribute("Name", EscapingUtilities.Escape(RootElementName))) :
Microsoft.Cci.Extensions (4)
Dgml\DgmlExtensions.cs (4)
42new XAttribute("Id", id), 43new XAttribute("Label", node)); 55new XAttribute("Source", source), 56new XAttribute("Target", target));
Microsoft.CodeAnalysis.Analyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.AnalyzerUtilities (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.BannedApiAnalyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.CodeStyle (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (12)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (4)
236element.Add(new XAttribute("Message", d.Message)); 238element.Add(new XAttribute("Start", d.Span.Start)); 239element.Add(new XAttribute("Length", d.Span.Length)); 307element.Add(new XAttribute("value", token.Value));
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (8)
189new XElement("Capture", new XAttribute("Name", kvp.Key), new XAttribute("Span", kvp.Value), GetTextAttribute(text, kvp.Value))), 191new XElement("Capture", new XAttribute("Name", kvp.Key), new XAttribute("Span", kvp.Value), GetTextAttribute(text, kvp.Value))))); 200new XAttribute("Message", d.Message), 201new XAttribute("Span", d.Span), 205=> new("Text", text.ToString(span)); 240element.Add(new XAttribute("value", token.Value));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Metadata\PE\LoadingNamespacesAndTypes.cs (2)
108elem.Add(new XAttribute("name", t.Name)); 112elem.Add(new XAttribute("arity", t.Arity));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
EmitMetadataTestBase.cs (5)
50elem.Add(new XAttribute("name", t.Name)); 66elem.Add(new XAttribute("Of", typeParams)); 71elem.Add(new XAttribute("base", t.BaseType().ToTestDisplayString())); 89elem.Add(new XAttribute("name", f.Name)); 90elem.Add(new XAttribute("type", f.Type.ToTestDisplayString()));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.PublicApiAnalyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.ResxSourceGenerator (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.SemanticSearch.Extensions (2)
ProjectModel.cs (2)
122new XAttribute("name", name), 123new XAttribute(XNamespace.Xml + "space", "preserve"),
Microsoft.CodeAnalysis.Test.Utilities (14)
InstrumentationChecker.cs (1)
273public static readonly XElement InstrumentationHelperSource = new XElement("file", new XAttribute("name", "c.vb"), InstrumentationHelperSourceStr);
Syntax\XmlHelpers.cs (13)
51xml.Add(new XAttribute("Type", info.ClassName)); 124new XAttribute("IsToken", false), 125new XAttribute("IsTrivia", true), 126new XAttribute("Kind", node.GetKind()), 127new XAttribute("IsMissing", node.IsMissing)); 165new XAttribute("IsToken", false), 166new XAttribute("IsTrivia", true), 167new XAttribute("Kind", token.GetKind()), 168new XAttribute("IsMissing", token.IsMissing)); 218new XAttribute("IsToken", false), 219new XAttribute("IsTrivia", true), 220new XAttribute("Kind", trivia.GetKind()), 221new XAttribute("IsMissing", false));
Microsoft.CodeAnalysis.Workspaces (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (14)
Workspaces\TestWorkspace_XmlCreation.cs (14)
91new XAttribute(AssemblyNameAttributeName, assemblyName), 92new XAttribute(LanguageAttributeName, language), 93commonReferences ? new XAttribute(CommonReferencesAttributeName, true) : null, 107return new XAttribute(LanguageVersionAttributeName, CodeAnalysis.CSharp.LanguageVersionFacts.ToDisplayString(csharpOptions.LanguageVersion)); 111return new XAttribute(LanguageVersionAttributeName, CodeAnalysis.VisualBasic.LanguageVersionFacts.ToDisplayString(vbOptions.LanguageVersion)); 127return new XAttribute(FeaturesAttributeName, value); 138return new XAttribute(DocumentationModeAttributeName, parseOptions.DocumentationMode); 192new XAttribute(FilePathAttributeName, filePath), 193new XAttribute(NormalizeAttributeName, false), 198element.Add(new XAttribute(FoldersAttributeName, folders)); 201element.Add(new XAttribute(MarkupAttributeName, isMarkup)); 209new XAttribute(FilePathAttributeName, hintName), 210new XAttribute(NormalizeAttributeName, false), 220new XAttribute(KindAttributeName, parseOptions.Kind));
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.Build.Tasks.Workloads (8)
Msi\MsiPayloadPackageProject.wix.cs (3)
62new XAttribute("Include", packageFile.Key), 63new XAttribute("Pack", "true"), 64new XAttribute("PackagePath", packageFile.Value)));
Msi\WorkloadPackGroupMsi.wix.cs (5)
95componentGroupRefElement.ReplaceWith(Enumerable.Range(1, _package.Packs.Count).Select(n => new XElement(ns + "ComponentGroupRef", new XAttribute("Id", "CG_PackageContents" + n)))); 105registryKeyElement.Add(new XElement(ns + "RegistryKey", new XAttribute("Key", pack.Id), 106new XElement(ns + "RegistryKey", new XAttribute("Key", pack.PackageVersion), 107new XElement(ns + "RegistryValue", new XAttribute("Value", ""), new XAttribute("Type", "string")))));
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\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"));
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")));
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.DotNet.XliffTasks.Tests (2)
XElementExtensionsTests.cs (2)
85new XAttribute("state", "original state value"))); 121new XAttribute("state", "new"),
Microsoft.Extensions.FileProviders.Embedded.Tests (2)
Manifest\TestEntry.cs (2)
24new XElement("File", new XAttribute("Name", Name), new XElement("ResourcePath", ResourcePath)) : 25new XElement("Directory", new XAttribute("Name", Name), Children.Select(c => c.ToXElement()));
Microsoft.Maui.Resizetizer (2)
GeneratePackageAppxManifest.cs (2)
320 showname.Add(new XElement(xshowon, new XAttribute("Tile", "square150x150Logo"))); 322 showname.Add(new XElement(xshowon, new XAttribute("Tile", "wide310x150Logo")));
Microsoft.ML.Maml (1)
HelpCommand.cs (1)
467new XAttribute("Kind", c.Kind),
Microsoft.NET.Build.Tasks (9)
GenerateToolsSettingsFile.cs (6)
65new XAttribute("Name", commandName)); 77packageNode.Add(new XAttribute("RuntimeIdentifier", toolPackageRuntimeIdentifier)); 80packageNode.Add(new XAttribute("Id", ridPackageId)); 89commandNode.Add(new XAttribute("EntryPoint", entryPointRelativePath), 90new XAttribute("Runner", commandRunner)); 94new XAttribute("Version", formatVersion),
WriteAppConfigWithSupportedRuntime.cs (3)
125new XAttribute("version", supportedRuntimeVersion)); 135new XAttribute("version", "v4.0"), 136new XAttribute("sku", $"{targetFrameworkIdentifier},Version={targetFrameworkVersion}{profileInSku}"));
Microsoft.NET.Build.Tasks.UnitTests (2)
GivenWriteAppConfigWithSupportedRuntimeTask.cs (2)
55new XAttribute("version", "v4.0"), 56new XAttribute("sku", ".NETFramework,Version=v4.7.2")))));
Microsoft.NET.Build.Tests (179)
COMReferenceTests.cs (3)
42new XAttribute("Include", "VSLangProj.dll"), 89new XAttribute("Include", vslangProj70ComRef), 101new XAttribute("Include", vslangProj80ComRef),
DepsFileSkipTests.cs (9)
204new XAttribute("Name", "AddFilesToSkip"), 205new XAttribute("BeforeTargets", "GenerateBuildDependencyFile"), 206new XAttribute("Condition", "'$(AddFileToSkip)' == 'true'")); 219new XAttribute("Include", "@(ResourceCopyLocalItems)"), 220new XAttribute("Condition", $"'%(DestinationSubPath)' == '{filenameToSkipWithCorrectSlash}'")); 227new XAttribute("Include", "@(ReferencePath);@(ReferenceDependencyPaths);@(RuntimePackAsset);@(NativeCopyLocalItems);@(ResourceCopyLocalItems);@(RuntimeTargetsCopyLocalItems)"), 228new XAttribute("Condition", $"'%(Filename)%(Extension)' == '{filenameToSkip}'")); 234new XAttribute("Include", "@(_FileToSkip)"), 235new XAttribute("KeepMetadata", "-None-"));
DesignTimeBuildTests.cs (2)
39new XAttribute("Name", "CollectFrameworkReferences"))); 216new XAttribute("Name", "CollectFrameworkReferences")));
GivenFrameworkReferences.cs (20)
204new XAttribute("Include", "NotAKnownFramework"))); 206new XAttribute("Include", "AnotherUnknownFramework"))); 243new XAttribute("Include", "Microsoft.ASPNETCORE.App"))); 285new XAttribute("Include", "NonExistentTestFrameworkReference"), 286new XAttribute("TargetFramework", "net5.0-notwindows7.0"), 287new XAttribute("RuntimeFrameworkName", "NonExistentTestFrameworkReference"), 288new XAttribute("DefaultRuntimeFrameworkVersion", "7.0"), 289new XAttribute("LatestRuntimeFrameworkVersion", "7.0"), 290new XAttribute("TargetingPackName", "NonExistentTestFrameworkReference"), 291new XAttribute("TargetingPackVersion", "7.0"))); 451new XAttribute("Include", "Microsoft.WindowsDesktop.App")); 811new XAttribute("Include", "Microsoft.NETCore.App"), 812new XAttribute("IsTrimmable", "false"))); 1088new XAttribute("Include", "Microsoft.NETCore.APP")); 1092new XAttribute("Update", "Microsoft.NETCore.App"), 1093new XAttribute("DefaultRuntimeFrameworkVersion", "3.0.0-defaultversion"), 1094new XAttribute("LatestRuntimeFrameworkVersion", "3.0.0-latestversion"), 1095new XAttribute("TargetingPackVersion", "3.0.0-targetingpackversion")); 1099new XAttribute("Update", "Microsoft.NETCore.App"), 1100new XAttribute("AppHostPackVersion", "3.0.0-apphostversion"));
GivenThatWeWantToBuildAComServerLibrary.cs (15)
158.WithProjectChanges(proj => proj.Root.Add(new XElement("ItemGroup", new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb"))))); 176new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb")), 177new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy2.tlb"))))); 197new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb"), new XAttribute("Id", 1)), 198new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy2.tlb"), new XAttribute("Id", 1))))); 222new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb"), new XAttribute("Id", id))))); 242new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb"), new XAttribute("Id", 1)), 243new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy2.tlb"), new XAttribute("Id", 2))))); 258.WithProjectChanges(proj => proj.Root.Add(new XElement("ItemGroup", new XElement("ComHostTypeLibrary", new XAttribute("Include", "doesnotexist.tlb"))))); 275.WithProjectChanges(proj => proj.Root.Add(new XElement("ItemGroup", new XElement("ComHostTypeLibrary", new XAttribute("Include", "invalid.tlb")))));
GivenThatWeWantToBuildACrossTargetedLibrary.cs (2)
99new XAttribute(ns + "Condition", "'$(TargetFramework)' == 'netstandard1.5'"), 103new XAttribute(ns + "Condition", $"'$(TargetFramework)' == '{ToolsetInfo.CurrentTargetFramework}'"),
GivenThatWeWantToBuildADesktopExe.cs (9)
281propertyGroup.Element(ns + "RuntimeIdentifier").Add(new XAttribute("Condition", "'$(TargetFramework)' == 'net46'")); 478itemGroup.Add(new XElement(ns + "Reference", new XAttribute("Include", "System"))); 510new XAttribute("Include", "NewtonSoft.Json"), 511new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()))); 574new XAttribute("Include", "System.Security.Cryptography.Algorithms"), 575new XAttribute("Version", "4.3.0"))); 659new XAttribute("Include", "System.Net.Http")); 728new XAttribute("Include", "System.Net.Http")); 841new XAttribute("version", "v999")))));
GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs (16)
45new XAttribute("Include", $@"..\{LibraryName}\{LibraryName}.csproj"))); 53new XAttribute("Include", LibraryName), 59new XAttribute("Include", binaryPath))); 199new XAttribute("Include", "NETStandard.Library"), 200new XAttribute("Version", "1.6.1"))); 205new XAttribute("Name", "CheckForConflicts"), 206new XAttribute("AfterTargets", "_HandlePackageFileConflicts")); 210new XAttribute("Files", "@(_ConflictPackageFiles)"), 211new XAttribute("Path", TestContext.Current.ToolsetUnderTest.GetMicrosoftNETBuildExtensionsPath()), 213new XAttribute("TaskParameter", "InPath"), 214new XAttribute("ItemName", "_ConflictsInSupportLibs")) 217new XAttribute("Condition", "'@(_ConflictsInSupportLibs)' == ''"), 218new XAttribute("Importance", "High"), 219new XAttribute("Text", successMessage))); 221new XAttribute("Condition", "'@(_ConflictsInSupportLibs)' != ''"), 222new XAttribute("Text", "Found conflicts under support libs: @(_ConflictsInSupportLibs)")));
GivenThatWeWantToBuildADesktopLibrary.cs (12)
98itemGroup.Add(new XElement(ns + "Reference", new XAttribute("Include", "System.Net.Http"))); 358new XAttribute("Include", "NETStandard.Library"), 359new XAttribute("Version", "2.0.3"))); 364new XAttribute("Include", dependency.Item1), 365new XAttribute("Version", dependency.Item2))); 418new XAttribute("Include", "System.Net.Http"), 419new XAttribute("Version", "4.3.2"))); 423new XAttribute("Include", "System.Net.Http"))); 483new XAttribute("Include", "System.Net.Http"), 531new XAttribute("Name", "Repro"), 532new XAttribute("DependsOnTargets", "RunResolvePublishAssemblies"), 533new XAttribute("BeforeTargets", "BeforeBuild")));
GivenThatWeWantToBuildALibrary.cs (1)
428itemGroup.Add(new XElement(ns + "SdkSupportedTargetPlatformVersion", new XAttribute("Include", targetPlatform)));
GivenThatWeWantToBuildAnAppWithTransitiveNonSdkProjectRefs.cs (2)
57new XAttribute("Name", "_IsProjectRestoreSupported"), 58new XAttribute("Returns", "@(_ValidProjectsForRestore)"));
GivenThatWeWantToBuildANetCoreApp.cs (4)
350new XAttribute("Include", dependency.Item1), 351new XAttribute("Version", dependency.Item2))); 472new XAttribute("Include", dependency.Item1), 473new XAttribute("Version", dependency.Item2)));
GivenThatWeWantToBuildANetStandard2Library.cs (2)
63new XAttribute("Include", dependency.Item1), 64new XAttribute("Version", dependency.Item2)));
GivenThatWeWantToBuildAWindowsRuntimeComponent.cs (1)
227new XAttribute("Include", @"..\SimpleMathComponent\SimpleMathComponent.vcxproj")));
GivenThatWeWantToControlGeneratedAssemblyInfo.cs (17)
118new XAttribute("Name", "InitializeSourceControlInformation"), 149new XAttribute("Name", "InitializeSourceControlInformation"), 181new XAttribute("Name", "_SetSourceRevisionId"), 182new XAttribute("BeforeTargets", "InitializeSourceControlInformation"), 188new XAttribute("Name", "InitializeSourceControlInformation"))); 217new XAttribute("Name", "_SetSourceRevisionId"), 218new XAttribute("BeforeTargets", "InitializeSourceControlInformation"), 224new XAttribute("Name", "InitializeSourceControlInformation"))); 353new XAttribute("Include", "Tests")))); 547new XAttribute("Include", "Tests")))); 572new XAttribute("Include", "Tests"), 573new XAttribute("Key", "00240000048000009400000006020000002400005253413100040000010001001d3e6bbb36e11ea61ceff6e1022b23dd779fc6230838db2d25a2c7c8433b3fcf86b16c25b281fc3db1027c0675395e7d0548e6add88b6a811962bf958101fa9e243b1618313bee11f5e3b3fefda7b1d1226311b6cc2d07e87ff893ba6890b20082df34a0aac14b605b8be055e81081a626f8c69e9ed4bbaa4eae9f94a35accd2")))); 600new XAttribute("Include", "Tests")))); 625new XAttribute("Include", "MetadataKey"), 626new XAttribute("Value", "MetadataValue")))); 653new XAttribute("Include", "MetadataKey"), 654new XAttribute("Value", "MetadataValue"))));
GivenThatWeWantToCopyPPFileToOutput.cs (4)
67itemGroup.Add(new XElement(ns + "Content", new XAttribute("Include", "Nontransformed.ps1"), 68new XAttribute("PackageCopyToOutput", "true"))); 69itemGroup.Add(new XElement(ns + "Content", new XAttribute("Include", "Test.ps1.pp"), 70new XAttribute("PackageCopyToOutput", "true")));
GivenThatWeWantToGenerateADepsFileForATool.cs (2)
127new XAttribute("Include", toolProject.Name), 128new XAttribute("Version", "1.0.0")));
GivenThatWeWantToReferenceAProject.cs (10)
215new XAttribute("Include", "script.sh"), new XAttribute("CopyToOutputDirectory", "PreserveNewest")); 221new XAttribute("Include", childPath)); 225new XAttribute("Name", "WriteOutput"), 226new XAttribute("DependsOnTargets", "GetCopyToOutputDirectoryItems"), 227new XAttribute("BeforeTargets", "_CopyOutOfDateSourceItemsToOutputDirectory")); 266new XElement(ns + "Content", new XAttribute("Include", "a.txt"), new XAttribute("CopyToOutputDirectory", "PreserveNewest")))); 329new XAttribute("Condition", $@"'$(TargetFramework)' == '{tfm}'")); 331new XAttribute("Include", Path.Combine(path, "..", "..", testProjectA.Name, $"{testProjectA.Name}.csproj")));
GivenThatWeWantToResolveConflicts.cs (3)
165new XAttribute("Include", @"$(NuGetPackageRoot)/microsoft.visualstudio.composition/15.8.112/lib/net45/Microsoft.VisualStudio.Composition.dll"), 166new XAttribute("Private", "true"))); 219new XAttribute("Include", "Microsoft.AspNetCore.App")));
GivenThatWeWantToTargetNet471.cs (3)
312new XAttribute("Include", "System.Net.Http"), 313new XAttribute("Aliases", "snh")); 462new XElement(ns + "None", new XAttribute("Include", "app.config")));
GivenThatWeWantToUseAnalyzers.cs (5)
174new XElement(ns + "FrameworkReference", new XAttribute("Include", "Microsoft.AspNetCore.App")))); 240new XAttribute("Include", "Microsoft.DependencyValidation.Analyzers"), 241new XAttribute("Version", "0.9.0")), 243new XAttribute("Include", "Microsoft.CodeQuality.Analyzers"), 244new XAttribute("Version", "2.6.0"))));
GivenThereAreDefaultItems.cs (20)
113itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "**\\*.cs"))); 155itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "..\\Shared\\**\\*.cs"))); 191itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Remove", "Excluded\\**\\*.cs"))); 228itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "obj\\Class2.cs"))); 264itemGroup.Add(new XElement(ns + "EmbeddedResource", new XAttribute("Include", "CSharpAsResource.cs"))); 265itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Remove", "CSharpAsResource.cs"))); 314itemGroup.Add(new XElement(ns + "Content", new XAttribute("Include", "CSharpAsContent.cs"), 315new XAttribute("CopyToOutputDirectory", "true"))); 316itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Remove", "CSharpAsContent.cs"))); 382itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", testProject.Name + ".cs"))); 383itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", testProject.Name + "Program.cs"))); 454itemGroup.Add(new XElement(ns + "None", new XAttribute("Update", "@(None)"), new XAttribute("CopyToOutputDirectory", "PreserveNewest"))); 499itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "Program.cs"))); 526itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", @"**\*.cs"))); 567new XAttribute("Include", "netstandard.Library"), new XAttribute("Version", "1.6.1"))); 598new XAttribute("Include", "Microsoft.NETCore.App"))); 639new XAttribute("Include", "Microsoft.NETCore.App"))); 642new XAttribute("Include", "Microsoft.NETCore.App")));
KnownRuntimePackTests.cs (13)
86new XAttribute("Update", "Microsoft.NETCore.App"), 87new XAttribute("RuntimePackLabels", "Mono")); 120new XAttribute("Update", "Microsoft.AspNetCore.App"), 121new XAttribute("RuntimePackExcludedRuntimeIdentifiers", "android")); 144new XAttribute("Include", "Microsoft.NETCore.App"), 145new XAttribute("TargetFramework", "net5.0"), 146new XAttribute("RuntimeFrameworkName", "Microsoft.NETCore.App"), 147new XAttribute("DefaultRuntimeFrameworkVersion", "5.0.0-preview1"), 148new XAttribute("LatestRuntimeFrameworkVersion", "5.0.0-preview1.1"), 149new XAttribute("RuntimePackNamePatterns", "Microsoft.NETCore.App.Runtime.Mono.**RID**"), 150new XAttribute("RuntimePackRuntimeIdentifiers", "linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;ios-arm64;ios-arm;iossimulator-x64;iossimulator-arm64;iossimulator-x86;tvos-arm64;tvossimulator-x64;tvossimulator-arm64;android-arm64;android-arm;android-x64;android-x86;browser-wasm;maccatalyst-x64;maccatalyst-arm64"), 151new XAttribute("IsTrimmable", "true"), 152new XAttribute("RuntimePackLabels", "Mono"));
NonCopyLocalProjectReferenceTests.cs (1)
44?.Add(new XAttribute("Private", "False")));
ReferenceExeTests.cs (1)
258new XAttribute("Condition", $"'$(TargetFramework)' == '{ToolsetInfo.CurrentTargetFramework}'"));
SourceLinkTests.cs (2)
272testAsset = WithItems(testAsset, ("PackageReference", new[] { new XAttribute("Include", "Microsoft.SourceLink.GitHub"), new XAttribute("Version", "1.0.0") }));
Microsoft.NET.Pack.Tests (4)
GivenThatWeWantToPackACppCliProject.cs (2)
36itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", package), 37new XAttribute("Version", version)));
GivenThatWeWantToPackANetFrameworkLibrary.cs (2)
53new XElement(pns + "Reference", new XAttribute("Include", "System")), 54new XElement(pns + "Reference", new XAttribute("Include", "System.Xml.Linq"))));
Microsoft.NET.Publish.Tests (55)
GivenThatWeWantToExcludeAPackageFromPublish.cs (10)
32itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", "NEWTONSOFT.Json"), 33new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()), 34new XAttribute("PrivateAssets", "All"))); 82itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", "Newtonsoft.Json"), 83new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()), 84new XAttribute("Publish", "false"))); 132itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", "Newtonsoft.Json"), 133new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()), 134new XAttribute("PrivateAssets", "All"), 135new XAttribute("Publish", "true")));
GivenThatWeWantToPublishAHelloWorldProject.cs (2)
301new XAttribute("Include", dependency.Item1), 302new XAttribute("Version", dependency.Item2)));
GivenThatWeWantToPublishAnAotApp.cs (7)
548new XAttribute("Update", "@(KnownILCompilerPack)"), 1034new XAttribute("BeforeTargets", "PrepareForILLink"), 1035new XAttribute("Name", targetName)); 1041new XAttribute("Condition", $"'%(FileName)' == '{assemblyName}'"), 1042new XAttribute(key, value)))); 1273new XAttribute("Include", "key1"), 1274new XAttribute("Value", "value1"))));
GivenThatWeWantToPublishASingleFileApp.cs (19)
145target.ReplaceAttributes(new XAttribute[] { new XAttribute("Name", "AfterAfterSdkPublish"), new XAttribute("AfterTargets", "AfterSdkPublish") }); 147message.ReplaceAttributes(new XAttribute[] { new XAttribute("Importance", "High"), new XAttribute("Text", "Executed AfterAfterSdkPublish") }); 1045new XAttribute("Name", targetName), 1046new XAttribute("BeforeTargets", "GenerateSingleFileBundle"), 1047new XAttribute("DependsOnTargets", "PrepareForBundle")); 1054new XAttribute("Condition", "'@(FilesToBundle->AnyHaveMetadataValue('RelativePath', 'System.Private.CoreLib.dll'))' != 'true'"), 1055new XAttribute("Text", "System.Private.CoreLib.dll is not in FilesToBundle list"))); 1063new XAttribute("Condition", $"'$(AppHostFile)' != '{host}'"), 1064new XAttribute("Text", $"AppHostFile expected to be: '{host}' actually: '$(AppHostFile)'"))); 1095new XAttribute("Name", targetName), 1096new XAttribute("BeforeTargets", "GenerateSingleFileBundle"), 1097new XAttribute("DependsOnTargets", "PrepareForBundle")); 1110new XAttribute("SourceFiles", "@(FilesToBundle)"), 1111new XAttribute("DestinationFiles", "@(FilesToBundle->'%(FullPath).renamed')"), 1112new XAttribute("Condition", "'%(FilesToBundle.RelativePath)' == 'SingleFileTest.dll'"))); 1125new XAttribute("Remove", "@(FilesToBundle)"), 1126new XAttribute("Condition", "'%(FilesToBundle.RelativePath)' == 'SingleFileTest.dll'"))));
GivenThatWeWantToRunILLink.cs (12)
156new XAttribute("Remove", "Microsoft.NET.ILLink.Tasks")))); 1878new XAttribute("Include", rootDescriptorFileName))); 1901new XAttribute("BeforeTargets", "PrepareForILLink"), 1902new XAttribute("Name", targetName)); 1908new XAttribute("Condition", $"'%(FileName)' == '{assemblyName}'"), 1909new XAttribute(key, value)))); 1942new XAttribute("BeforeTargets", "PrepareForILLink"), 1943new XAttribute("Name", "_EnableNonFrameworkTrimming")); 1951new XAttribute("Include", "@(IntermediateAssembly->'%(FullPath)')"))); 1982new XAttribute("Include", "DisableFeature"), 1983new XAttribute("Value", "true"), 1984new XAttribute("Trim", trim.ToString()))));
PublishTestUtils.cs (4)
120new XAttribute("Condition", "'$(TargetFramework)' == 'alias-ns2'"), 124new XAttribute("Condition", "'$(TargetFramework)' == 'alias-n6'"), 128new XAttribute("Condition", "'$(TargetFramework)' == 'alias-n7'"), 132new XAttribute("Condition", "'$(TargetFramework)' == 'alias-n8'"),
PublishWebApp.cs (1)
35new XAttribute("Include", "Microsoft.AspNetCore.App")));
Microsoft.NET.Restore.Tests (9)
GivenThatWeWantAutomaticTargetingPackReferences.cs (8)
80new XAttribute("Include", $"Microsoft.NETFramework.ReferenceAssemblies"), 81new XAttribute("Version", $"1.0.0-preview.2"))); 146new XAttribute("Include", $"Newtonsoft.Json"), 147new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()))); 149new XAttribute("Include", $"sqlite"), 150new XAttribute("Version", $"3.13.0"))); 152new XAttribute("Include", $"Microsoft.NETFramework.ReferenceAssemblies"), 153new XAttribute("Version", $"1.0.0")));
GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs (1)
36new XAttribute("Include", obsoletePackageId)));
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.BlazorWebAssembly.Tests (19)
WasmBuildIntegrationTest.cs (5)
581itemGroup.Add(new XElement("ProjectReference", new XAttribute("Include", @"..\classlibrarywithsatelliteassemblies\classlibrarywithsatelliteassemblies.csproj"))); 675new XAttribute("Include", "classlibrarywithsatelliteassemblies"), 676new XAttribute("HintPath", referenceAssemblyPath))); 751new XAttribute("Include", "classlibrarywithsatelliteassemblies"), 752new XAttribute("HintPath", referenceAssemblyPath)));
WasmBuildLazyLoadTest.cs (6)
27new XAttribute("Include", "RazorClassLibrary.wasm"))); 79new XAttribute("Include", "RazorClassLibrary.wasm"))); 131new XAttribute("Include", "RazorClassLibrary.wasm"))); 183new XAttribute("Include", "RazorClassLibrary.wasm"))); 235new XAttribute("Include", "RazorClassLibraryInvalid.wasm"))); 256new XAttribute("Include", "RazorClassLibraryInvalid.wasm")));
WasmJsModulesIntegrationTests.cs (3)
178new XAttribute("Update", "wwwroot\\blazorwasm-minimal.lib.module.build.js"), 179new XAttribute("CopyToPublishDirectory", "Never"), 180new XAttribute("TargetPath", "wwwroot\\blazorwasm-minimal.lib.module.js"))));
WasmPublishIntegrationTest.cs (5)
551itemGroup.Add(new XElement("ProjectReference", new XAttribute("Include", @"..\classlibrarywithsatelliteassemblies\classlibrarywithsatelliteassemblies.csproj"))); 741itemGroup.Add(new XElement("ProjectReference", new XAttribute("Include", @"..\classlibrarywithsatelliteassemblies\classlibrarywithsatelliteassemblies.csproj"))); 1156itemGroup.Add(new XElement("ProjectReference", new XAttribute("Include", @"..\classlibrarywithsatelliteassemblies\classlibrarywithsatelliteassemblies.csproj"))); 1583new XAttribute("Include", "classlibrarywithsatelliteassemblies"), 1584new XAttribute("HintPath", referenceAssemblyPath)));
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.Publish.Tasks.Tests (2)
WebConfigTransformTests.cs (2)
247new XElement("environmentVariable", new XAttribute("name", "ENVVAR"), new XAttribute("value", "123"));
Microsoft.NET.Sdk.Razor.Tests (3)
BuildIntegrationTest.cs (2)
197itemGroup.Add(new XElement("ProjectReference", new XAttribute("Include", "..\\AnotherClassLib\\AnotherClassLib.csproj"))); 236itemGroup.Add(new XElement("ProjectReference", new XAttribute("Include", "..\\ClassLibraryMvc21\\ClassLibraryMvc21.csproj")));
PublishIntegrationTest.cs (1)
166itemGroup.Add(new XElement("ProjectReference", new XAttribute("Include", "..\\AnotherClassLib\\AnotherClassLib.csproj")));
Microsoft.NET.Sdk.StaticWebAssets.Tasks (7)
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
55new XAttribute("Include", element.Route),
GenerateStaticWebAssetsPropsFile.cs (1)
72new 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)));
Microsoft.NET.Sdk.StaticWebAssets.Tests (22)
JsModulesIntegrationTest.cs (3)
298new XAttribute("Update", "wwwroot\\AnotherClassLib.lib.module.build.js"), 299new XAttribute("CopyToPublishDirectory", "Never"), 300new XAttribute("TargetPath", "wwwroot\\AnotherClassLib.lib.module.js"))));
ScopedCssIntegrationTests.cs (1)
75var element = new XElement("ScopedCssInput", new XAttribute("Include", @"Styles\Pages\Counter.css"));
StaticWebAssetEndpointsIntegrationTest.cs (5)
299new XAttribute("Update", "wwwroot/app.js"), 300new XAttribute("CopyToPublishDirectory", "Never")), 302new XAttribute("Update", "wwwroot/app.publish.js"), 303new XAttribute("TargetPath", "wwwroot/app.js"), 304new XAttribute("CopyToPublishDirectory", "PreserveNewest"))));
StaticWebAssetsIntegrationTest.cs (12)
480sdkAttribute = new XAttribute("Sdk", "Microsoft.NET.Sdk"); 487project.Root.AddFirst(new XElement("Import", new XAttribute("Project", "ExternalStaticAssets.targets"))); 535sdkAttribute = new XAttribute("Sdk", "Microsoft.NET.Sdk"); 542project.Root.AddFirst(new XElement("Import", new XAttribute("Project", "ExternalStaticAssets.targets"))); 554new XAttribute("Include", "Version"), 555new XAttribute("Pattern", ".*(?<fingerprint>v\\d{1})\\.js$")))); 587new XAttribute("Update", "wwwroot\\file.build.txt"), 588new XAttribute("TargetPath", "wwwroot\\file.txt"), 589new XAttribute("CopyToPublishDirectory", "Never")), 591new XAttribute("Update", "wwwroot\\file.publish.txt"), 592new XAttribute("TargetPath", "wwwroot\\file.txt"), 593new XAttribute("CopyToOutputDirectory", "Never"))));
StaticWebAssetsPackIntegrationTest.cs (1)
20var element = new XElement("StaticWebAsset", new XAttribute("Include", @"bundle\js\pkg-direct-dep.js"));
Microsoft.NET.TestFramework (35)
Commands\GetValuesCommand.cs (7)
107new XAttribute("Name", TargetName), 108ShouldCompile ? new XAttribute("DependsOnTargets", DependsOnTargets) : null); 128new XAttribute("Include", linesAttribute))); 132new XAttribute("File", $@"bin\$(Configuration)\$(TargetFramework)\{_valueName}Values.txt"), 133new XAttribute("Lines", "@(LinesToWrite)"), 134new XAttribute("Overwrite", bool.TrueString), 135new XAttribute("Encoding", "Unicode")));
NuGetConfigWriter.cs (2)
25new XAttribute("key", Guid.NewGuid().ToString()), 26new XAttribute("value", nugetSources[i] ?? string.Empty)
ProjectConstruction\TestProject.cs (22)
193new XAttribute(includeOrUpdate, packageReference.ID)); 196packageReferenceElement.Add(new XAttribute("Version", packageReference.Version)); 200packageReferenceElement.Add(new XAttribute("PrivateAssets", packageReference.PrivateAssets)); 204packageReferenceElement.Add(new XAttribute("Aliases", packageReference.Aliases)); 208packageReferenceElement.Add(new XAttribute("Publish", packageReference.Publish)); 216new XAttribute("Include", $"{dotnetCliToolReference.ID}"), 217new XAttribute("Version", $"{dotnetCliToolReference.Version}"))); 281item.Add(new XAttribute(attribute.Key, attribute.Value)); 312new XAttribute("Include", $"../{referencedProject.Name}/{referencedProject.Name}{referencedProject.TargetExtension}"))); 329new XAttribute("Include", reference))); 340new XAttribute("Include", frameworkReference))); 349new XAttribute("Name", copyFilesTarget.TargetName), 350new XAttribute("AfterTargets", copyFilesTarget.TargetToRunAfter)); 353new XAttribute("SourceFiles", copyFilesTarget.SourceFiles), 354new XAttribute("DestinationFolder", copyFilesTarget.Destination)); 382new XAttribute("Name", "WritePropertyValues"), 383new XAttribute("BeforeTargets", "AfterBuild")); 394new XAttribute("Include", $"{propertyName}: $({propertyName})"))); 399new XAttribute("File", $@"$(BaseIntermediateOutputPath)\$(Configuration)\$(TargetFramework)\PropertyValues.txt"), 400new XAttribute("Lines", "@(LinesToWrite)"), 401new XAttribute("Overwrite", bool.TrueString), 402new XAttribute("Encoding", "Unicode")));
Utilities\ProjectModification.cs (4)
16XElement target = new(ns + "Target", new XAttribute("Name", "DisplayMessages"), 17new XAttribute("BeforeTargets", beforeTargets)); 20target.Add(new XElement(ns + "Message", new XAttribute("Text", "Important text"), 21new XAttribute("Importance", "high")));
Microsoft.NET.ToolPack.Tests (2)
GivenThatWeWantToPackAToolProjectWithComplexNugetDependency.cs (2)
65itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", "System.Data.SqlClient"), 66new XAttribute("Version", ToolsetInfo.GetSystemDataSqlClientPackageVersion())));
Microsoft.VisualStudio.LanguageServices (2)
Snippets\SnippetExpansionClient.cs (2)
689new XAttribute(snippetNamespace + "Format", "1.0.0"), 699new XAttribute(snippetNamespace + "Language", "csharp"),
Microsoft.VisualStudio.LanguageServices.Implementation (4)
SolutionExplorer\RuleSetDocumentExtensions.cs (4)
86new XAttribute("Id", id), 87new XAttribute("Action", "Warning")); 103new XAttribute("AnalyzerId", analyzerID), 104new XAttribute("RuleNamespace", analyzerID));
Roslyn.Diagnostics.Analyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\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)
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 (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);
Text.Analyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (4)
117new XAttribute(XmlAttribute_SerializationVersion, SerializationVersion), 118new XAttribute(XmlAttribute_Type, GetTypeNameForSerialization()), 119new XAttribute(XmlAttribute_Value, GetValueForSerialization()), 120new XAttribute(XmlAttribute_DiagnosticSeverity, Notification.Severity.ToDiagnosticSeverity() ?? DiagnosticSeverity.Hidden));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
344new XAttribute("SerializationVersion", s_serializationVersion),
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
215new XAttribute(nameof(ID), ID), 216new XAttribute(nameof(Name), Name),
XmlFileLogger (19)
LogProcessNode.cs (1)
131propElement.Add(new XElement("Property", new XAttribute("Name", p.Key)) { Value = p.Value });
ObjectModel\Build.cs (5)
48new XAttribute("BuildSucceeded", buildFinishedEventArgs.Succeeded), 49new XAttribute("StartTime", StartTime), 50new XAttribute("EndTime", EndTime), 51new XAttribute("Errors", errorCount), 52new XAttribute("Warnings", warningCount));
ObjectModel\Item.cs (1)
76element.Add(new XAttribute(xmlAttributeName, Text));
ObjectModel\Message.cs (1)
36element.Add(new XElement("Message", new XAttribute("Timestamp", _timestamp), new XText(_message)));
ObjectModel\Project.cs (4)
99new XAttribute("Name", Name.Replace("\"", string.Empty)), 100new XAttribute("StartTime", StartTime), 101new XAttribute("EndTime", EndTime), 102new XAttribute("ProjectFile", _projectFile));
ObjectModel\Target.cs (3)
36new XAttribute("Name", Name), 37new XAttribute("StartTime", StartTime), 38new XAttribute("EndTime", EndTime));
ObjectModel\Task.cs (4)
50new XAttribute("Name", Name), 51new XAttribute("FromAssembly", _fromAssembly), 52new XAttribute("StartTime", StartTime), 53new XAttribute("EndTime", EndTime));
xunit.console (1)
ConsoleRunner.cs (1)
306assembliesElement.Add(new XAttribute("timestamp", DateTime.Now.ToString(CultureInfo.InvariantCulture)));
515 references to XAttribute
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");
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
249var imageAttribute = element.Attribute("image");
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
249var imageAttribute = element.Attribute("image");
Metrics (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Metrics.Legacy (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
290private static XAttribute GetTextAttribute(SourceText text, TextSpan span)
Microsoft.AspNetCore.DataProtection (1)
XmlExtensions.cs (1)
22foreach (var attr in element.Attributes())
Microsoft.AspNetCore.DataProtection.Tests (9)
XmlAssert.cs (9)
46private static readonly IEqualityComparer<XAttribute> AttributeEqualityComparer = new CallbackBasedEqualityComparer<XAttribute>(AreEqual); 83private static bool AreEqual(IEnumerable<XAttribute> expected, IEnumerable<XAttribute> actual) 85List<XAttribute> orderedExpected = expected 90List<XAttribute> orderedActual = actual 98private static bool AreEqual(XAttribute expected, XAttribute actual) 104private static bool ShouldIncludeAttributeDuringComparison(XAttribute attribute)
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)
235var name = assemblyIdentity.Attribute("name"); 236var publicKeyToken = assemblyIdentity.Attribute("publicKeyToken"); 245var culture = assemblyIdentity.Attribute("culture"); 248var oldVersionAttribute = bindingRedirect.Attribute("oldVersion"); 249var newVersionAttribute = bindingRedirect.Attribute("newVersion"); 294var attributes = new List<XAttribute>(4)
AssemblyDependency\ResolveAssemblyReference.cs (1)
1249var assemblyIdentityAttributes = new List<XAttribute>(4);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (6)
361XAttribute includeAttribute = child.Attributes().FirstOrDefault(i => i.Name.LocalName.Equals("Include")); 375XAttribute namespaceAttribute = child.Attributes().FirstOrDefault(i => i.Name.LocalName.Equals("Namespace")); 417XAttribute languageAttribute = null; 418XAttribute sourceAttribute = null; 419XAttribute typeAttribute = null; 422foreach (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\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var 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.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
204private static XAttribute GetTextAttribute(SourceText text, TextSpan span)
Microsoft.CodeAnalysis.Features (11)
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)
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (6)
539var upToDateAttribute = patchElement.Attribute(UpToDateAttributeName); 542var tooOldAttribute = patchElement.Attribute(TooOldAttributeName); 545var contentsAttribute = patchElement.Attribute(ContentAttributeName); 689var contentsAttribute = element.Attribute(ContentAttributeName); 699var checksumAttribute = element.Attribute(ChecksumAttributeName); 720private static async Task<byte[]> ConvertContentAttributeAsync(XAttribute contentsAttribute, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (2)
144var delimiterAttribute = code.Attributes().FirstOrDefault(a => a.Name.LocalName.Equals("Delimiter", StringComparison.OrdinalIgnoreCase)); 160var editableAttribute = declarationElement.Attribute("Editable");
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.Test.Utilities (1)
Assert\AssertXml.cs (1)
263private static Tuple<XName, string> MakeAttributeTuple(XAttribute attribute)
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 (6)
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\XmlUtilities.cs (2)
48IEnumerator<XAttribute> sourceAttributes = sourceElement.Attributes().GetEnumerator(); 49IEnumerator<XAttribute> targetAttributes = targetElement.Attributes().GetEnumerator();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (43)
Options\NamingStyleTestUtilities.cs (1)
54foreach (var attribute in element.Attributes())
Workspaces\TestWorkspace_XmlConsumption.cs (39)
247var preprocessorSymbolsAttribute = projectElement.Attribute(PreprocessorSymbolsAttributeName); 257var languageVersionAttribute = projectElement.Attribute(LanguageVersionAttributeName); 263var featuresAttribute = projectElement.Attribute(FeaturesAttributeName); 278private static ParseOptions GetPreProcessorParseOptions(string language, XAttribute preprocessorSymbolsAttribute) 295private static ParseOptions GetParseOptionsWithFeatures(ParseOptions parseOptions, XAttribute featuresAttribute) 311private static ParseOptions GetParseOptionsWithLanguageVersion(string language, ParseOptions parseOptions, XAttribute languageVersionAttribute) 334var documentationModeAttribute = projectElement.Attribute(DocumentationModeAttributeName); 347var assemblyNameAttribute = projectElement.Attribute(AssemblyNameAttributeName); 363var languageAttribute = projectElement.Attribute(LanguageAttributeName); 383var rootNamespaceAttribute = projectElement.Attribute(RootNamespaceAttributeName); 426var rootNamespaceAttribute = compilationOptionsElement.Attribute(RootNamespaceAttributeName); 432var outputKindAttribute = compilationOptionsElement.Attribute(OutputKindName); 438var checkOverflowAttribute = compilationOptionsElement.Attribute(CheckOverflowAttributeName); 444var allowUnsafeAttribute = compilationOptionsElement.Attribute(AllowUnsafeAttributeName); 450var reportDiagnosticAttribute = compilationOptionsElement.Attribute(ReportDiagnosticAttributeName); 456var cryptoKeyFileAttribute = compilationOptionsElement.Attribute(CryptoKeyFileAttributeName); 462var strongNameProviderAttribute = compilationOptionsElement.Attribute(StrongNameProviderAttributeName); 479var delaySignAttribute = compilationOptionsElement.Attribute(DelaySignAttributeName); 485var nullableAttribute = compilationOptionsElement.Attribute(NullableAttributeName); 491var outputTypeAttribute = compilationOptionsElement.Attribute(OutputTypeAttributeName); 555var isLinkFileAttribute = documentElement.Attribute(IsLinkFileAttributeName); 624var attr = optionsElement.Attribute(KindAttributeName); 630var markupAttribute = documentElement.Attribute(MarkupAttributeName); 701var filePathAttribute = documentElement.Attribute(FilePathAttributeName); 715var folderAttribute = documentElement.Attribute(FoldersAttributeName); 737var includeXmlDocCommentsAttribute = referencedSource.Attribute(IncludeXmlDocCommentsAttributeName); 757var assemblyNameAttribute = referencedSource.Attribute(AssemblyNameAttributeName); 839var net45 = element.Attribute(CommonReferencesNet45AttributeName); 853var commonReferencesAttribute = element.Attribute(CommonReferencesAttributeName); 867var commonReferencesWithoutValueTupleAttribute = element.Attribute(CommonReferencesWithoutValueTupleAttributeName); 875var winRT = element.Attribute(CommonReferencesWinRTAttributeName); 889var portable = element.Attribute(CommonReferencesPortableAttributeName); 897var netcore30 = element.Attribute(CommonReferencesNetCoreAppName); 905var netstandard20 = element.Attribute(CommonReferencesNetStandard20Name); 913var net6 = element.Attribute(CommonReferencesNet6Name); 921var net7 = element.Attribute(CommonReferencesNet7Name); 929var net8 = element.Attribute(CommonReferencesNet8Name); 937var net9 = element.Attribute(CommonReferencesNet9Name); 945var mincorlib = element.Attribute(CommonReferencesMinCorlibName);
Workspaces\TestWorkspace_XmlCreation.cs (3)
101private static XAttribute CreateLanguageVersionAttribute(ParseOptions parseOptions) 119private static XAttribute CreateFeaturesAttribute(ParseOptions parseOptions) 130private static XAttribute CreateDocumentationModeAttribute(ParseOptions parseOptions)
Microsoft.DotNet.Arcade.Sdk (2)
src\ExtractNgenMethodList.cs (2)
60var flagsInt = child.Attribute("flagsInt"); 61var 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)
85XAttribute 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)
86var experimental = installationElement.Attribute("Experimental"); 95var systemComponent = installationElement.Attribute(systemComponentName);
Microsoft.DotNet.NuGetRepack.Tasks (4)
src\NuGetVersionUpdater.cs (3)
142var xmlNsAttribute = nuspecXml.Root.Attributes("xmlns").SingleOrDefault(); 271var name = packageType.Attribute("name"); 303var versionRangeAttribute = dependency.Attribute("version");
src\ReplacePackageParts.cs (1)
148var xmlNsAttribute = nuspecXml.Root.Attributes("xmlns").SingleOrDefault();
Microsoft.DotNet.SharedFramework.Sdk (1)
src\CreateFrameworkListFile.cs (1)
63XAttribute[] 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)
90XAttribute 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.Build.Tests (1)
SourceLinkTests.cs (1)
83private static TestAsset WithItems(TestAsset testAsset, params (string key, XAttribute[] attributes)[] items)
Microsoft.NET.Publish.Tests (2)
GivenThatWeWantToPublishASingleFileApp.cs (2)
145target.ReplaceAttributes(new XAttribute[] { new XAttribute("Name", "AfterAfterSdkPublish"), new XAttribute("AfterTargets", "AfterSdkPublish") }); 147message.ReplaceAttributes(new XAttribute[] { new XAttribute("Importance", "High"), new XAttribute("Text", "Executed AfterAfterSdkPublish") });
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.NET.Sdk.StaticWebAssets.Tests (2)
StaticWebAssetsIntegrationTest.cs (2)
477var sdkAttribute = project.Root.Attribute("Sdk"); 532var sdkAttribute = project.Root.Attribute("Sdk");
Microsoft.NET.TestFramework (2)
ProjectConstruction\TestProject.cs (1)
168var sdkAttribute = projectXml.Root.Attribute("Sdk");
TestAsset.cs (1)
167foreach (var versionAttribute in packageReferencesToUpdate)
Microsoft.VisualStudio.LanguageServices (1)
Snippets\SnippetExpansionClient.cs (1)
314var delimiterAttribute = codeNode.Attribute("Delimiter");
netstandard (1)
netstandard.cs (1)
2266[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XAttribute))]
Roslyn.Diagnostics.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);
Roslyn.Test.PdbUtilities (2)
Reader\PdbValidation.cs (2)
368var name = e.Attribute("name"); 376var flags = e.Attribute("flags");
RulesetToEditorconfigConverter (1)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
sdk-tasks (1)
OverrideAndCreateBundledNETCoreAppPackageVersion.cs (1)
100foreach (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; 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\XDocument.cs (2)
855internal override void AddAttribute(XAttribute a) 860internal 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)
artifacts\obj\System.Xml.XDocument\Debug\net10.0\System.Xml.XDocument.Forwards.cs (1)
7[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Xml.Linq.XAttribute))]
Test.Utilities (1)
RulesetToEditorconfigConverter.cs (1)
146XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
Text.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
148XAttribute? ruleId = ruleNode.Attribute(RuleIdAttributeName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (3)
170var typeAttribute = element.Attribute(XmlAttribute_Type); 171var valueAttribute = element.Attribute(XmlAttribute_Value); 172var severityAttribute = element.Attribute(XmlAttribute_DiagnosticSeverity);