203 references to Attribute
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)
59.ToDictionary(elem => elem.Attribute("name").Value, 60elem => elem.Attribute("value").Value); 97.ToDictionary(elem => elem.Attribute("name").Value, 98elem => 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)
273Guid keyId = (Guid)keyElement.Attribute(IdAttributeName)!; 328string keyIdAsString = (string)revocationElement.Element(KeyElementName)!.Attribute(IdAttributeName)!; 485string 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)
3063string 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.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.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)
51var localizableProperties = element.Attribute(XName.Get(LocalizedPropertiesAttributeName, XliffTasksNs))?.Value?.Split(';'); 153idBuilder.Append(element.Parent.Attribute("Name") is null ? XmlName(element.Parent) : $"{XmlName(element.Parent)}|{AttributedName(element.Parent)}"); 158if (element.Attribute("Name") is null) 172while (ancestorWithNameAttributeCandidate?.Attribute("Name") is null && ancestorWithNameAttributeCandidate?.Parent is not null) { 181idBuilder.Append(element.Attribute("Name") is not null ? AttributedName(element) : XmlName(element)); 218private 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;
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)