362 references to Attribute
BuildBoss (8)
ProjectUtil.cs (8)
60var hasProjectWithSdkAttribute = Document.XPathSelectElements("//mb:Project", Manager).FirstOrDefault()?.Attribute("Sdk") != null; 107.Select(x => x.Attribute("Project")?.Value) 120var referenceOutputAssemblyValue = r.Element(Namespace.GetName("ReferenceOutputAssembly"))?.Value ?? r.Attribute(XName.Get("ReferenceOutputAssembly"))?.Value; 136var relativePath = r.Attribute("Include").Value; 157var targetAssembly = element.Attribute("Include")?.Value.Trim(); 158var key = element.Attribute("Key")?.Value.Trim(); 159var loadsWithinVisualStudio = element.Attribute("LoadsWithinVisualStudio")?.Value.Trim(); 160var workItem = element.Attribute("WorkItem")?.Value.Trim();
dotnet-svcutil-lib (2)
Shared\Utilities\RuntimeEnvironmentHelper.cs (2)
87.Select(e => e.Attribute("value").Value.TrimEnd(Path.DirectorySeparatorChar)) 95while (pkgSourcesNode.Elements("add").Any(e => StringComparer.OrdinalIgnoreCase.Compare(e.Attribute("key").Value, feedName) == 0))
IIS.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
158var requestStatus = eventElement.Element(nameSpace + "EventData").Descendants().Where(el => el.Attribute("Name").Value == "requestStatus").SingleOrDefault();
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (4)
242element.Attribute("name")?.Value.StartsWith("AspNetCoreModule", StringComparison.Ordinal) == true && 243element.Attribute("image") != null); 245var sourceDirectory = new DirectoryInfo(Path.GetDirectoryName(moduleNodes.First().Attribute("image").Value)); 250var imageAttribute = element.Attribute("image");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
89.Any(n => "hostingModel".Equals(n.Attribute("name")?.Value, StringComparison.Ordinal));
IIS.LongTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
89.Any(n => "hostingModel".Equals(n.Attribute("name")?.Value, StringComparison.Ordinal));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (2)
321.FirstOrDefault(e => e.Attribute("name").Value == "AspNetCoreModuleV2"); 323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
IIS.NewHandler.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
89.Any(n => "hostingModel".Equals(n.Attribute("name")?.Value, StringComparison.Ordinal));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (2)
321.FirstOrDefault(e => e.Attribute("name").Value == "AspNetCoreModuleV2"); 323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
IIS.NewShim.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
89.Any(n => "hostingModel".Equals(n.Attribute("name")?.Value, StringComparison.Ordinal));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (2)
321.FirstOrDefault(e => e.Attribute("name").Value == "AspNetCoreModuleV2"); 323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
89.Any(n => "hostingModel".Equals(n.Attribute("name")?.Value, StringComparison.Ordinal));
IISExpress.FunctionalTests (7)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
158var requestStatus = eventElement.Element(nameSpace + "EventData").Descendants().Where(el => el.Attribute("Name").Value == "requestStatus").SingleOrDefault();
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (4)
242element.Attribute("name")?.Value.StartsWith("AspNetCoreModule", StringComparison.Ordinal) == true && 243element.Attribute("image") != null); 245var sourceDirectory = new DirectoryInfo(Path.GetDirectoryName(moduleNodes.First().Attribute("image").Value)); 250var imageAttribute = element.Attribute("image");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (2)
321.FirstOrDefault(e => e.Attribute("name").Value == "AspNetCoreModuleV2"); 323ancmElement.SetAttributeValue("image", ancmElement.Attribute("image").Value.Replace("x64", "x86"));
Microsoft.AspNetCore.App.UnitTests (18)
SharedFxTests.cs (7)
272_output.WriteLine(string.Join('\n', runtimeListEntries.Select(i => i.Attribute("Path").Value).OrderBy(i => i))); 279var filePath = i.Attribute("Path").Value; 301var assemblyType = i.Attribute("Type").Value; 302var assemblyPath = i.Attribute("Path").Value; 303var fileVersion = i.Attribute("FileVersion").Value; 307var assemblyVersion = i.Attribute("AssemblyVersion").Value; 336var expectedPaths = runtimeListEntries.Select(i => i.Attribute("Path").Value).ToHashSet();
TargetingPackTests.cs (11)
301var managedEntries = frameworkListEntries.Where(i => i.Attribute("Type").Value.Equals("Managed", StringComparison.Ordinal)); 302var analyzerEntries = frameworkListEntries.Where(i => i.Attribute("Type").Value.Equals("Analyzer", StringComparison.Ordinal)); 318_output.WriteLine(string.Join('\n', actualElements.Select(i => i.Attribute("AssemblyName").Value).OrderBy(i => i))); 325var fileName = i.Attribute("AssemblyName").Value; 346var assemblyPath = i.Attribute("Path").Value; 347var assemblyVersion = i.Attribute("AssemblyVersion").Value; 348var fileVersion = i.Attribute("FileVersion").Value; 378var expectedPaths = frameworkListEntries.Select(i => i.Attribute("Path").Value).ToHashSet(); 407var analyzerEntries = frameworkListEntries.Where(i => i.Attribute("Type").Value.Equals("Analyzer", StringComparison.Ordinal)); 411var actualLanguage = analyzerEntry.Attribute("Language")?.Value; 412var assemblyPath = analyzerEntry.Attribute("Path").Value;
Microsoft.AspNetCore.Authentication.Test (33)
CertificateTests.cs (20)
480var actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "issuer"); 484actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Thumbprint); 491actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.X500DistinguishedName); 501actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.SerialNumber); 511actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Dns); 521actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Email); 531actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); 541actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Upn); 551actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Uri); 609var name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); 612var count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount"); 628name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); 631count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount"); 679var actual = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); 736var name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); 739var count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount"); 755name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); 758count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount"); 777name = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == ClaimTypes.Name); 780count = responseAsXml.Elements("claim").Where(claim => claim.Attribute("Type").Value == "ValidationCount");
CookieTests.cs (4)
1754var claim = transaction.ResponseElement.Elements("claim").SingleOrDefault(elt => elt.Attribute("type").Value == claimType); 1759return claim.Attribute("value").Value; 1764var property = transaction.ResponseElement.Elements("extra").SingleOrDefault(elt => elt.Attribute("type").Value == key); 1769return property.Attribute("value").Value;
OpenIdConnect\TestSettings.cs (4)
63.ToDictionary(elem => elem.Attribute("name").Value, 64elem => elem.Attribute("value").Value); 101.ToDictionary(elem => elem.Attribute("name").Value, 102elem => elem.Attribute("value").Value);
Transaction.cs (5)
39.SingleOrDefault(elt => elt.Attribute("type").Value == claimType && 40(issuer == null || elt.Attribute("issuer").Value == issuer)); 45return claim.Attribute("value").Value; 51.SingleOrDefault(elt => elt.Attribute("name").Value == name); 56return claim.Attribute("value").Value;
Microsoft.AspNetCore.CookiePolicy.Test (3)
Transaction.cs (3)
40.SingleOrDefault(elt => elt.Attribute("type").Value == claimType && 41(issuer == null || elt.Attribute("issuer").Value == issuer)); 46return claim.Attribute("value").Value;
Microsoft.AspNetCore.DataProtection (18)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializer.cs (2)
34configuration.EncryptionAlgorithm = (EncryptionAlgorithm)Enum.Parse(typeof(EncryptionAlgorithm), (string)encryptionElement.Attribute("algorithm")!); 40configuration.ValidationAlgorithm = (ValidationAlgorithm)Enum.Parse(typeof(ValidationAlgorithm), (string)validationElement.Attribute("algorithm")!);
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializer.cs (5)
36configuration.EncryptionAlgorithm = (string)encryptionElement.Attribute("algorithm")!; 37configuration.EncryptionAlgorithmKeySize = (int)encryptionElement.Attribute("keyLength")!; 38configuration.EncryptionAlgorithmProvider = (string?)encryptionElement.Attribute("provider"); // could be null 41configuration.HashAlgorithm = (string)hashElement.Attribute("algorithm")!; 42configuration.HashAlgorithmProvider = (string?)hashElement.Attribute("provider"); // could be null
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptorDeserializer.cs (3)
35configuration.EncryptionAlgorithm = (string)encryptionElement.Attribute("algorithm")!; 36configuration.EncryptionAlgorithmKeySize = (int)encryptionElement.Attribute("keyLength")!; 37configuration.EncryptionAlgorithmProvider = (string?)encryptionElement.Attribute("provider"); // could be null
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializer.cs (3)
35configuration.EncryptionAlgorithmType = ManagedAlgorithmHelpers.FriendlyNameToType((string)encryptionElement.Attribute("algorithm")!); 36configuration.EncryptionAlgorithmKeySize = (int)encryptionElement.Attribute("keyLength")!; 39configuration.ValidationAlgorithmType = ManagedAlgorithmHelpers.FriendlyNameToType((string)validationElement.Attribute("algorithm")!);
AuthenticatedEncryption\ConfigurationModel\XmlExtensions.cs (1)
17return ((bool?)element.Attribute(XmlConstants.RequiresEncryptionAttributeName)).GetValueOrDefault();
KeyManagement\XmlKeyManager.cs (3)
295Guid keyId = (Guid)keyElement.Attribute(IdAttributeName)!; 350string keyIdAsString = (string)revocationElement.Element(KeyElementName)!.Attribute(IdAttributeName)!; 577string descriptorDeserializerTypeName = (string)descriptorElement!.Attribute(DeserializerTypeAttributeName)!;
XmlEncryption\XmlEncryptionExtensions.cs (1)
50string decryptorTypeName = (string)clonedElementWhichRequiresDecryption.Attribute(XmlConstants.DecryptorTypeAttributeName)!;
Microsoft.AspNetCore.DataProtection.Tests (1)
XmlEncryption\CertificateXmlEncryptionTests.cs (1)
51Assert.Equal("http://www.w3.org/2001/04/xmlenc#Element", (string)encryptedXmlInfo.EncryptedElement.Attribute("Type"));
Microsoft.AspNetCore.Identity.InMemory.Test (2)
FunctionalTest.cs (2)
283var claim = transaction.ResponseElement.Elements("claim").SingleOrDefault(elt => elt.Attribute("type").Value == claimType); 288return claim.Attribute("value").Value;
Microsoft.AspNetCore.Rewrite (15)
IISUrlRewrite\RewriteMapParser.cs (3)
24var map = new IISRewriteMap(mapElement.Attribute(RewriteTags.Name)?.Value!); 27map[addElement.Attribute(RewriteTags.Key)!.Value.ToLowerInvariant()] = addElement.Attribute(RewriteTags.Value)!.Value;
IISUrlRewrite\UrlRewriteFileParser.cs (12)
60builder.Name = rule.Attribute(RewriteTags.Name)?.Value; 93var parsedInputString = match.Attribute(RewriteTags.Url)?.Value; 132var parsedInputString = conditionElement.Attribute(RewriteTags.Input)?.Value; 139var parsedPatternString = conditionElement.Attribute(RewriteTags.Pattern)?.Value; 200if (urlAction.Attribute(RewriteTags.Url) != null) 202url = urlAction.Attribute(RewriteTags.Url)!.Value; 227if (!int.TryParse(urlAction.Attribute(RewriteTags.StatusCode)?.Value, NumberStyles.None, CultureInfo.InvariantCulture, out statusCode)) 237if (!string.IsNullOrEmpty(urlAction.Attribute(RewriteTags.SubStatusCode)?.Value)) 242var statusReason = urlAction.Attribute(RewriteTags.StatusReason)?.Value; 243var statusDescription = urlAction.Attribute(RewriteTags.StatusDescription)?.Value; 256var attribute = element.Attribute(rewriteTag); 272var attribute = element.Attribute(rewriteTag);
Microsoft.AspNetCore.Server.IntegrationTesting (1)
xunit\IISExpressAncmSchema.cs (1)
46.Any(n => "hostingModel".Equals(n.Attribute("name")?.Value, StringComparison.Ordinal));
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (4)
IISDeployer.cs (1)
143if (aspNetCore.Attribute("processPath")?.Value.StartsWith("dotnet", StringComparison.Ordinal) == true)
IISDeploymentParameterExtensions.cs (2)
212aspNetCoreElement.SetAttributeValue("processPath", transformation((string)aspNetCoreElement.Attribute("processPath"), contentRoot)); 222aspNetCoreElement.SetAttributeValue("arguments", transformation((string)aspNetCoreElement.Attribute("arguments"), contentRoot));
XElementExtensions.cs (1)
35var existing = element.Elements(name).FirstOrDefault(e => e.Attribute(attribute)?.Value == attributeValue);
Microsoft.Build.Tasks.Core (12)
AssemblyDependency\GenerateBindingRedirects.cs (5)
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");
GenerateResource.cs (1)
3065string name = dataElem.Attribute("name").Value;
ResourceHandling\MSBuildResXReader.cs (6)
58string alias = elem.Attribute("alias")?.Value; 59string name = elem.Attribute("name").Value; 114string name = elem.Attribute("name").Value; 116bool preserve = elem.Attribute(XName.Get("space", "http://www.w3.org/XML/1998/namespace"))?.Value == "preserve"; 137string typename = elem.Attribute("type")?.Value; 138string mimetype = elem.Attribute("mimetype")?.Value;
Microsoft.CodeAnalysis (1)
RuleSet\RuleSetProcessor.cs (1)
255XAttribute attribute = node.Attribute(attributeName);
Microsoft.CodeAnalysis.CodeStyle (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
474id: Guid.Parse(namingStyleElement.Attribute(nameof(ID)).Value), 475name: namingStyleElement.Attribute(nameof(Name)).Value, 476prefix: namingStyleElement.Attribute(nameof(Prefix)).Value, 477suffix: namingStyleElement.Attribute(nameof(Suffix)).Value, 478wordSeparator: namingStyleElement.Attribute(nameof(WordSeparator)).Value, 479capitalizationScheme: (Capitalization)Enum.Parse(typeof(Capitalization), namingStyleElement.Attribute(nameof(CapitalizationScheme)).Value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
380var serializationVersion = int.Parse(rootElement.Attribute("SerializationVersion").Value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
46EnforcementLevel = ((DiagnosticSeverity)Enum.Parse(typeof(DiagnosticSeverity), namingRuleElement.Attribute(nameof(EnforcementLevel))!.Value)).ToReportDiagnostic(), 47NamingStyleID = Guid.Parse(namingRuleElement.Attribute(nameof(NamingStyleID))!.Value), 48SymbolSpecificationID = Guid.Parse(namingRuleElement.Attribute(nameof(SymbolSpecificationID))!.Value)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
284id: Guid.Parse(symbolSpecificationElement.Attribute(nameof(ID)).Value), 285name: symbolSpecificationElement.Attribute(nameof(Name)).Value,
Microsoft.CodeAnalysis.CSharp (4)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (4)
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));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
95diagnosticElement.Attribute("Message").Remove();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
DocumentationComments\CrefTests.cs (2)
6924var cref = xml.Descendants("see").Single().Attribute("cref").Value; 6948var cref = xml.Descendants("see").Single().Attribute("cref").Value;
Symbols\MockSymbolTests.cs (1)
109string name = xel.Attribute("name").Value;
Microsoft.CodeAnalysis.Features (5)
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (5)
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);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
160var editableAttribute = declarationElement.Attribute("Editable");
Microsoft.CodeAnalysis.Test.Utilities (18)
Metadata\ILValidation.cs (18)
333let xmlTokenValue = e.Attribute("token")?.Value 342.Descendants().ToImmutableDictionary(e => e.Attribute("id").Value, e => e.Attribute("name").Value); 355add(Convert.ToInt32(e.Attribute("offset").Value, 16), (e.Attribute("hidden")?.Value == "true") ? "~" : "-"); 363add(Convert.ToInt32(e.Attribute("yield").Value, 16), "<"); 364add(Convert.ToInt32(e.Attribute("resume").Value, 16), ">"); 368add(Convert.ToInt32(e.Attribute("offset").Value, 16), "$"); 386add(Convert.ToInt32(e.Attribute("yield").Value, 16), "async: yield"); 387add(Convert.ToInt32(e.Attribute("resume").Value, 16), "async: resume"); 391add(Convert.ToInt32(e.Attribute("offset").Value, 16), "async: catch handler"); 399var documentId = e.Attribute("document").Value; 402add(Convert.ToInt32(e.Attribute("offset").Value, 16), "sequence point: " + SnippetFromSpan(source, e)); 411if (sequencePointXml.Attribute("hidden")?.Value == "true") 416var startLine = Convert.ToInt32(sequencePointXml.Attribute("startLine").Value) - 1; 417var startColumn = Convert.ToInt32(sequencePointXml.Attribute("startColumn").Value) - 1; 418var endLine = Convert.ToInt32(sequencePointXml.Attribute("endLine").Value) - 1; 419var endColumn = Convert.ToInt32(sequencePointXml.Attribute("endColumn").Value) - 1;
Microsoft.CodeAnalysis.Workspaces (17)
Shared\Extensions\ISymbolExtensions.cs (3)
347var crefAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.CrefAttributeName)); 348var pathAttribute = element.Attribute(XName.Get(DocumentationCommentXmlNames.PathAttributeName)); 429if (typeParameterRef.Attribute(DocumentationCommentXmlNames.NameAttributeName) is XAttribute typeParamName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
474id: Guid.Parse(namingStyleElement.Attribute(nameof(ID)).Value), 475name: namingStyleElement.Attribute(nameof(Name)).Value, 476prefix: namingStyleElement.Attribute(nameof(Prefix)).Value, 477suffix: namingStyleElement.Attribute(nameof(Suffix)).Value, 478wordSeparator: namingStyleElement.Attribute(nameof(WordSeparator)).Value, 479capitalizationScheme: (Capitalization)Enum.Parse(typeof(Capitalization), namingStyleElement.Attribute(nameof(CapitalizationScheme)).Value));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (1)
380var serializationVersion = int.Parse(rootElement.Attribute("SerializationVersion").Value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SerializableNamingRule.cs (3)
46EnforcementLevel = ((DiagnosticSeverity)Enum.Parse(typeof(DiagnosticSeverity), namingRuleElement.Attribute(nameof(EnforcementLevel))!.Value)).ToReportDiagnostic(), 47NamingStyleID = Guid.Parse(namingRuleElement.Attribute(nameof(NamingStyleID))!.Value), 48SymbolSpecificationID = Guid.Parse(namingRuleElement.Attribute(nameof(SymbolSpecificationID))!.Value)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
284id: Guid.Parse(symbolSpecificationElement.Attribute(nameof(ID)).Value), 285name: symbolSpecificationElement.Attribute(nameof(Name)).Value,
Utilities\Documentation\XmlDocumentationProvider.cs (2)
79if (e.Attribute("name") != null) 80comments[e.Attribute("name").Value] = e.ToString();
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\BuildHostProcessManager.cs (1)
327if (document.Root.Attribute("Sdk") != null)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (52)
Workspaces\TestWorkspace_XmlConsumption.cs (52)
132var projectName = projectElement.Attribute(ProjectNameAttribute)?.Value ?? assemblyName; 134if (projectElement.Attribute(FilePathAttributeName) != null) 136projectFilePath = projectElement.Attribute(FilePathAttributeName).Value; 187var markupCode = (bool?)sourceGeneratedDocumentElement.Attribute(NormalizeAttributeName) is false 243var preprocessorSymbolsAttribute = projectElement.Attribute(PreprocessorSymbolsAttributeName); 253var languageVersionAttribute = projectElement.Attribute(LanguageVersionAttributeName); 259var featuresAttribute = projectElement.Attribute(FeaturesAttributeName); 330var documentationModeAttribute = projectElement.Attribute(DocumentationModeAttributeName); 343var assemblyNameAttribute = projectElement.Attribute(AssemblyNameAttributeName); 359var languageAttribute = projectElement.Attribute(LanguageAttributeName); 379var rootNamespaceAttribute = projectElement.Attribute(RootNamespaceAttributeName); 423var rootNamespaceAttribute = compilationOptionsElement.Attribute(RootNamespaceAttributeName); 429var outputKindAttribute = compilationOptionsElement.Attribute(OutputKindName); 435var checkOverflowAttribute = compilationOptionsElement.Attribute(CheckOverflowAttributeName); 441var allowUnsafeAttribute = compilationOptionsElement.Attribute(AllowUnsafeAttributeName); 447var reportDiagnosticAttribute = compilationOptionsElement.Attribute(ReportDiagnosticAttributeName); 453var cryptoKeyFileAttribute = compilationOptionsElement.Attribute(CryptoKeyFileAttributeName); 459var strongNameProviderAttribute = compilationOptionsElement.Attribute(StrongNameProviderAttributeName); 476var delaySignAttribute = compilationOptionsElement.Attribute(DelaySignAttributeName); 482var nullableAttribute = compilationOptionsElement.Attribute(NullableAttributeName); 488var outputTypeAttribute = compilationOptionsElement.Attribute(OutputTypeAttributeName); 552var isLinkFileAttribute = documentElement.Attribute(IsLinkFileAttributeName); 558var originalAssemblyName = documentElement.Attribute(LinkAssemblyNameAttributeName)?.Value; 559var originalProjectName = documentElement.Attribute(LinkProjectNameAttributeName)?.Value; 570return p.Attribute(AssemblyNameAttributeName)?.Value == originalAssemblyName; 574return p.Attribute(ProjectNameAttribute)?.Value == originalProjectName; 590var originalDocumentPath = documentElement.Attribute(LinkFilePathAttributeName)?.Value; 599return d.Attribute(FilePathAttributeName)?.Value == originalDocumentPath; 608var markupCode = (bool?)documentElement.Attribute(NormalizeAttributeName) is false 621var attr = optionsElement.Attribute(KindAttributeName); 627var markupAttribute = documentElement.Attribute(MarkupAttributeName); 679var canApplyChange = (bool?)documentElement.Attribute("CanApplyChange"); 680var supportDiagnostics = (bool?)documentElement.Attribute("SupportDiagnostics"); 696var filePathAttribute = documentElement.Attribute(FilePathAttributeName); 710var folderAttribute = documentElement.Attribute(FoldersAttributeName); 728var aliasElement = referencedSource.Attribute("Aliases")?.Value; 732var includeXmlDocCommentsAttribute = referencedSource.Attribute(IncludeXmlDocCommentsAttributeName); 740var referencesOnDisk = projectElement.Attribute(ReferencesOnDiskAttributeName) is { } onDiskAttribute 760var assemblyNameAttribute = referencedSource.Attribute(AssemblyNameAttributeName); 831display: (string)analyzer.Attribute(AnalyzerDisplayAttributeName), 832fullPath: (string)analyzer.Attribute(AnalyzerFullPathAttributeName))); 842var net45 = element.Attribute(CommonReferencesNet45AttributeName); 856var commonReferencesAttribute = element.Attribute(CommonReferencesAttributeName); 870var commonReferencesWithoutValueTupleAttribute = element.Attribute(CommonReferencesWithoutValueTupleAttributeName); 878var winRT = element.Attribute(CommonReferencesWinRTAttributeName); 893var portable = element.Attribute(CommonReferencesPortableAttributeName); 902var netcore30 = element.Attribute(CommonReferencesNetCoreAppName); 910var netstandard20 = element.Attribute(CommonReferencesNetStandard20Name); 918var net6 = element.Attribute(CommonReferencesNet6Name); 926var net7 = element.Attribute(CommonReferencesNet7Name); 934var net8 = element.Attribute(CommonReferencesNet8Name); 942var mincorlib = element.Attribute(CommonReferencesMinCorlibName);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
UtilityTest\XmlDocumentationProviderTests.cs (1)
45Assert.Equal("T:Microsoft.CodeAnalysis.AdditionalTextFile", xmlDocument.Root!.Attribute("name")!.Value);
Microsoft.DotNet.Arcade.Sdk (11)
src\ExtractNgenMethodList.cs (2)
60var flagsInt = child.Attribute("flagsInt"); 61var name = child.Attribute("name");
src\GenerateResxSource.cs (1)
108string name = node.Attribute("name")?.Value;
src\SourceBuild\AddSourceMappingToNugetConfig.cs (1)
51.Select(e => e.Attribute("pattern").Value)
src\SourceBuild\AddSourceToNuGetConfig.cs (1)
50.FirstOrDefault(e => e.Attribute("key").Value == SourceName);
src\SourceBuild\ReadSourceBuildIntermediateNupkgDependencies.cs (6)
65string repoName = sourceBuildElement.Attribute("RepoName")?.Value; 73string dependencyName = d.Attribute("Name")?.Value ?? string.Empty; 81string dependencyVersion = d.Attribute("Version")?.Value; 85string sourceBuildRepoName = sourceBuildElement.Attribute("RepoName")?.Value; 86string sourceBuildManagedOnly = sourceBuildElement.Attribute("ManagedOnly")?.Value; 98sourceBuildElement.Attribute("ManagedOnly")?.Value,
Microsoft.DotNet.Arcade.Sdk.Tests (1)
SourceMappingToNugetConfigTest.cs (1)
56.Where(e => e.Attribute("key").Value == "foo")
Microsoft.DotNet.Build.Tasks.Installers (6)
src\GenerateMacOSDistributionFile.cs (3)
81.WithAttribute("id", c.Attribute("id").Value + ".alternate") 87.Select(c => new XElement("line", new XAttribute("choice", c.Attribute("id").Value))); 100if (optionsElement.Attribute("hostArchitectures") is null)
src\StabilizeWixFileId.cs (3)
72.Where(f => f.Attribute("Source")?.Value 85XAttribute nameAttribute = matchingFileElements[0].Attribute("Id"); 95matchingFileElements[0].Attribute("Source").Value);
Microsoft.DotNet.Build.Tasks.Packaging (2)
PackageIndex.cs (2)
219string assemblyName = file.Attribute("AssemblyName").Value; 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.Build.Tasks.Workloads (1)
Msi\WorkloadPackGroupMsi.wix.cs (1)
85var dotnetHomeElement = directoriesDoc.Root.Descendants().Where(d => (string)d.Attribute("Id") == "DOTNETHOME").Single();
Microsoft.DotNet.MacOsPkg (1)
Package.cs (1)
177pkgInfo.Attribute(elementName)?.Value ?? throw new Exception($"{elementName} is required in PackageInfo");
Microsoft.DotNet.NuGetRepack.Tasks (3)
src\NuGetVersionUpdater.cs (3)
271var name = packageType.Attribute("name"); 297string id = dependency.Attribute("id")?.Value; 303var versionRangeAttribute = dependency.Attribute("version");
Microsoft.DotNet.SignTool.Tests (1)
FakeBuildEngine.cs (1)
63FakeSignTool.SignFile(file.Attribute("Include").Value);
Microsoft.DotNet.SourceBuild.Tasks (10)
src\UsageReport\Usage.cs (4)
41AssetsFile = xml.Attribute("File")?.Value, 42IsDirectDependency = Convert.ToBoolean(xml.Attribute(nameof(IsDirectDependency))?.Value), 43IsAutoReferenced = Convert.ToBoolean(xml.Attribute(nameof(IsAutoReferenced))?.Value), 44RuntimePackageRid = xml.Attribute("Rid")?.Value
src\UsageReport\UsagePattern.cs (2)
22IdentityRegex = xml.Attribute(nameof(IdentityRegex))?.Value, 23IdentityGlob = xml.Attribute(nameof(IdentityGlob))?.Value
src\UsageReport\WriteUsageReports.cs (2)
86x.Attribute("Id")?.Value, 87x.Attribute("OriginBuildName")?.Value);
src\UsageReport\XmlParsingHelpers.cs (2)
27xml.Attribute("Id").Value, 28NuGetVersion.Parse(xml.Attribute("Version").Value));
Microsoft.DotNet.VersionTools (1)
BuildManifest\Model\XElementParsingExtensions.cs (1)
15string value = element.Attribute(name)?.Value;
Microsoft.DotNet.XliffTasks (22)
Model\ResxDocument.cs (4)
21if (node.Attribute("type") != null || node.Attribute("mimetype") != null) 26string name = node.Attribute("name").Value; 61if (node.Attribute("type")?.Value == "System.Resources.ResXFileRef, System.Windows.Forms")
Model\VsctDocument.cs (5)
22string id = strings.Parent.Attribute("id").Value; 27string guid = strings.Parent.Attribute("guid").Value; 66string id = strings.Parent.Attribute("id").Value; 81XAttribute hrefAttribute = imageTag.Attribute("href"); 89imageTag.Attribute("href").Value = absolutePath;
Model\XamlRuleDocument.cs (6)
53var localizableProperties = element.Attribute(XName.Get(LocalizedPropertiesAttributeName, XliffTasksNs))?.Value?.Split(';'); 155idBuilder.Append(element.Parent.Attribute("Name") is null ? XmlName(element.Parent) : $"{XmlName(element.Parent)}|{AttributedName(element.Parent)}"); 160if (element.Attribute("Name") is null) 174while (ancestorWithNameAttributeCandidate?.Attribute("Name") is null && ancestorWithNameAttributeCandidate?.Parent is not null) { 183idBuilder.Append(element.Attribute("Name") is not null ? AttributedName(element) : XmlName(element)); 220private static string? AttributedName(XElement element) => element.Attribute("Name")?.Value;
Model\XElementExtensions.cs (4)
40if (targetElement.Attribute("state") == null) 54transUnitElement.Element(Target)?.Attribute("state")?.Value 73XAttribute stateAttribute = targetElement.Attribute("state"); 136transUnitElement.Attribute("id").Value;
Model\XlfDocument.cs (1)
90XAttribute originalAttribute = fileElement.Attribute("original");
Tasks\TransformTemplates.cs (2)
79string projectFileFullPath = Path.Combine(templateDirectory, projectNode.Attribute("File").Value); 80File.Copy(projectFileFullPath, Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value)), overwrite: true);
Microsoft.DotNet.XliffTasks.Tests (3)
XElementExtensionsTests.cs (3)
126Assert.Equal(expected: "translated", actual: transUnitElement.Element(Target).Attribute("state").Value); 139Assert.Equal(expected: "translated", actual: transUnitElement.Element(Target).Attribute("state").Value); 151Assert.Equal(expected: "translated", actual: transUnitElement.Element(Target).Attribute("state").Value);
Microsoft.Extensions.FileProviders.Embedded (1)
Manifest\ManifestParser.cs (1)
128var value = element.Attribute("Name")?.Value;
Microsoft.Maui.Resizetizer (21)
GeneratePackageAppxManifest.cs (14)
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); 319 if (showons.All(x => x.Attribute("Tile")?.Value != "square150x150Logo")) 321 if (showons.All(x => x.Attribute("Tile")?.Value != "wide310x150Logo")) 338 var attr = splash.Attribute(xname);
GenerateTizenManifest.cs (7)
145 if (icon.Attribute(DpiName) == null) 152 string dpiValue = icon.Attribute(DpiName).Value; 172 d => d.Attribute("type")?.Value == "img" 173 && d.Attribute(DpiName)?.Value == image.Key.Resolution 174 && d.Attribute("orientation")?.Value == image.Key.Orientation 175 && d.Attribute("indicator-display")?.Value == "false"); 192 var attr = element.Attribute(attrName);
Microsoft.VisualStudio.LanguageServices (8)
ColorSchemes\ColorSchemeApplier.ColorSchemeReader.cs (7)
39var themeName = (string)themeElement.Attribute("Name"); 40var themeGuid = Guid.Parse((string)themeElement.Attribute("GUID")); 50var categoryName = (string)categoryElement.Attribute("Name"); 51var categoryGuid = Guid.Parse((string)categoryElement.Attribute("GUID")); 63var name = (string)colorElement.Attribute("Name"); 85var colorType = (string)colorElement.Attribute("Type"); 86var sourceColor = (string)colorElement.Attribute("Source");
Snippets\SnippetExpansionClient.cs (1)
316var delimiterAttribute = codeNode.Attribute("Delimiter");
Roslyn.Test.PdbUtilities (5)
Reader\PdbValidation.cs (5)
368var name = e.Attribute("name"); 376var flags = e.Attribute("flags"); 659var expectedTags = pdbXml.DescendantsAndSelf("closure").Select((c, i) => new { Tag = $"<C:{i}>", StartIndex = methodStart + int.Parse(c.Attribute("offset").Value) }).ToList(); 662expectedTags.AddRange(pdbXml.DescendantsAndSelf("lambda").Select((c, i) => new { Tag = $"<L:{i}.{int.Parse(c.Attribute("closure").Value)}>", StartIndex = methodStart + int.Parse(c.Attribute("offset").Value) }));
System.ComponentModel.TypeConverter (1)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (1)
155return _value = new XDeferredSingleton<XAttribute>((e, n) => e.Attribute(n), (component as XElement)!, null);
System.Private.Xml.Linq (6)
System\Xml\Linq\XElement.cs (3)
1217XAttribute? a = Attribute(name); 1901if (Attribute(a.Name) != null) throw new InvalidOperationException(SR.InvalidOperation_DuplicateAttribute); 1908if (Attribute(a.Name) != null) throw new InvalidOperationException(SR.InvalidOperation_DuplicateAttribute);
System\Xml\Linq\XNodeReader.cs (2)
402XAttribute? a = e.Attribute(name); 428XAttribute? a = e.Attribute(name);
System\Xml\XPath\XNodeNavigator.cs (1)
854if (ce.Attribute(name) != null)