1 override of Attributes
System.Private.Xml (1)
System\Xml\Dom\XmlElement.cs (1)
238public override XmlAttributeCollection Attributes
156 references to Attributes
Interop.FunctionalTests (4)
H2SpecCommands.cs (4)
278if (node.Attributes["errors"].Value != "0") 281failures.Add("Test failed: " + node.Attributes["package"].Value + "; " + node.Attributes["name"].Value); 283if (node.Attributes["tests"].Value != "0")
Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests (12)
TransformTest.cs (12)
33Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value); 36depsElement.Attributes["value"].Value); 40Assert.Equal("DOTNET_SHARED_STORE", sharedStoreElement.Attributes["name"].Value); 41Assert.Equal($@"{XdtExtensionPath}\store", sharedStoreElement.Attributes["value"].Value); 45Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value); 46Assert.Equal("Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value); 63Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value); 67depsElement.Attributes["value"].Value); 71Assert.Equal("DOTNET_SHARED_STORE", sharedStoreElement.Attributes["name"].Value); 72Assert.Equal($@"ExistingValue3;{XdtExtensionPath}\store", sharedStoreElement.Attributes["value"].Value); 76Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value); 77Assert.Equal("ExistingValue2;Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value);
Microsoft.Build (3)
Evaluation\Preprocessor.cs (3)
350if (clone.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.project, child.Name, StringComparison.Ordinal) && clone.Attributes?[XMakeAttributes.sdk] != null) 352clone.Attributes.Remove(clone.Attributes[XMakeAttributes.sdk]);
Microsoft.Build.BuildCheck.UnitTests (1)
EndToEndTests.cs (1)
934node.Attributes!.Append(attribute);
Microsoft.Build.Tasks.Core (67)
BootstrapperUtil\BootstrapperBuilder.cs (38)
557XmlAttribute cultureAttribute = (XmlAttribute)rootNode?.Attributes.GetNamedItem("Culture"); 567resourcesNode.Attributes.RemoveNamedItem("Culture"); 570resourcesNode.Attributes.Append(newAttribute); 671var relatedProductAttribute = (XmlAttribute)(relatedProductNode.Attributes.GetNamedItem("Code")); 717XmlAttribute relatedProductAttribute = (XmlAttribute)(relatedProduct.Attributes.GetNamedItem("Code")); 898var productCodeAttribute = (XmlAttribute)(baseNode.Attributes.GetNamedItem("ProductCode")); 1133XmlAttribute attrib = targetNode.Attributes[attributeName]; 1145targetNode.Attributes.SetNamedItem(attribute); 1150var targetAttribute = (XmlAttribute)(targetNode.Attributes.GetNamedItem(attribute.Name)); 1154targetNode.Attributes.Append(attribute); 1164var nameAttribute = (XmlAttribute)(packageFileNode.Attributes.GetNamedItem("Name")); 1240XmlAttribute keyAttribute = (XmlAttribute)(nextNode.Attributes.GetNamedItem(strSubNodeKey)); 1274foreach (XmlAttribute attribute in langNode.Attributes) 1278foreach (XmlAttribute attribute in baseNode.Attributes) 1280if (mergeSubNode.Attributes.GetNamedItem(attribute.Name) == null) 1307var attribute = (XmlAttribute)(currentNode.Attributes.GetNamedItem("PackageFile")); 1312var targetPathAttribute = (XmlAttribute)(packageFileNode.Attributes.GetNamedItem("TargetPath")); 1347var attribute = (XmlAttribute)(currentNode.Attributes.GetNamedItem("String")); 1353currentNode.Attributes.Remove(attribute); 1407XmlAttribute eulaAttribute = node.Attributes[EULA_ATTRIBUTE]; 1412var packageFileSource = (XmlAttribute)(packageFileNode.Attributes.GetNamedItem("SourcePath")); 1413var packageFileDestination = (XmlAttribute)(packageFileNode.Attributes.GetNamedItem("TargetPath")); 1414var packageFileName = (XmlAttribute)(packageFileNode.Attributes.GetNamedItem("Name")); 1415var packageFileCopy = (XmlAttribute)(packageFileNode.Attributes.GetNamedItem("CopyOnBuild")); 1563var sourceAttribute = (XmlAttribute)(node.Attributes.GetNamedItem("ProductCode")); 1568node.Attributes.Remove(sourceAttribute); 1575var attribute = (XmlAttribute)(node.Attributes.GetNamedItem(strAttributeName)); 1641var attribute = (XmlAttribute)(node.Attributes.GetNamedItem(attributeName)); 1763_results?.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.NoStringsForCulture", resourcesNode.Attributes.GetNamedItem("Culture").Value)); 1771XmlAttribute resourceIdAttribute = (XmlAttribute)stringNode.Attributes.GetNamedItem("Name"); 1904XmlAttribute oldNameAttribute = (XmlAttribute)(sourceNode.Attributes.GetNamedItem(sourceOldName)); 1905XmlAttribute newNameAttribute = (XmlAttribute)(sourceNode.Attributes.GetNamedItem(sourceNewName)); 1944node.Attributes.Append(attrib); 2073XmlAttribute homesiteAttribute = packageFileNode.Attributes[HOMESITE_ATTRIBUTE]; 2086XmlAttribute hashAttribute = packageFileNode.Attributes[HASH_ATTRIBUTE]; 2087XmlAttribute publicKeyAttribute = packageFileNode.Attributes[PUBLICKEY_ATTRIBUTE]; 2114packageFileNode.Attributes.RemoveNamedItem(PUBLICKEY_ATTRIBUTE); 2184if (currentNode.Attributes.Count == 0 && currentNode.InnerText.Length > 0)
CodeTaskFactory.cs (8)
199if (taskContent.Attributes["Type"] != null) 201_type = taskContent.Attributes["Type"].Value; 209if (taskContent.Attributes["Language"] != null) 211_language = taskContent.Attributes["Language"].Value; 219if (taskContent.Attributes["Source"] != null) 221_sourcePath = taskContent.Attributes["Source"].Value; 430XmlAttribute attribute = referenceNodes[i].Attributes["Include"]; 469XmlAttribute attribute = usingNodes[i].Attributes["Namespace"];
GenerateApplicationManifest.cs (1)
466var attr = (XmlAttribute)(node.Attributes.GetNamedItem("level"));
ManifestUtil\DeployManifest.cs (1)
222XmlAttribute nameattr = fileListNode?.Attributes["InstallableFramework"];
XamlTaskFactory\RelationsParser.cs (9)
285foreach (XmlAttribute attribute in node.Attributes) 329if (node.Attributes != null) 331foreach (XmlAttribute attribute in node.Attributes) 398foreach (XmlAttribute attribute in node.Attributes) 442foreach (XmlAttribute attrib in child.Attributes) 486foreach (XmlAttribute attrib in child.Attributes) 500foreach (XmlAttribute attrib in child.Attributes) 514foreach (XmlAttribute attrib in child.Attributes) 553foreach (XmlAttribute attribute in node.Attributes)
XmlPeek.cs (2)
195XmlAttribute prefix = xn.Attributes?[prefixAttr]; 202XmlAttribute uri = xn.Attributes[uriAttr];
XmlPoke.cs (2)
182XmlAttribute prefix = xn.Attributes?[prefixAttr]; 189XmlAttribute uri = xn.Attributes[uriAttr];
XslTransformation.cs (6)
233if (xn.Attributes["Name"] == null) 238if (xn.Attributes["Value"] == null) 244if (xn.Attributes["Namespace"] != null) 246ns = xn.Attributes["Namespace"].Value; 249arguments.AddParam(xn.Attributes["Name"].Value, ns, xn.Attributes["Value"].Value);
Microsoft.Maui.Controls.SourceGen (4)
CodeBehindGenerator.cs (4)
163 foreach (XmlAttribute attr in root.Attributes) 409 var rootClass = root.Attributes["Class", XamlParser.X2006Uri] 410 ?? root.Attributes["Class", XamlParser.X2009Uri]; 619 var attr = node.Attributes[localName, namespaceURI];
Microsoft.ML.NugetPackageVersionUpdater (2)
Program.cs (2)
66var packageName = packageReferenceNodes.Item(i).Attributes.GetNamedItem("Include").InnerText; 71packageReferenceNodes.Item(i).Attributes.GetNamedItem("Version").InnerText = latestVersion;
Microsoft.Web.Xdt.Extensions (3)
InsertOrAppendAttribute.cs (3)
92foreach (XmlAttribute att in TransformNode.Attributes) 109foreach (XmlAttribute att in targetNode.Attributes) 136targetNode.Attributes.Append(attribute);
Microsoft.Web.Xdt.Extensions.Tests (16)
InsertOrAppendAttributeTests.cs (16)
28Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 29Assert.Equal("InsertValue1", firstChild.Attributes["value"].Value); 33Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 34Assert.Equal("InsertValue2", secondChild.Attributes["value"].Value); 52Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 53Assert.Equal("InsertValue1", firstChild.Attributes["value"].Value); 57Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 58Assert.Equal("InsertValue2", secondChild.Attributes["value"].Value); 76Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 77Assert.Equal("InsertValue1", firstChild.Attributes["value"].Value); 81Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 82Assert.Equal("InsertValue2", secondChild.Attributes["value"].Value); 100Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 101Assert.Equal("ExistingValue1;InsertValue1", firstChild.Attributes["value"].Value); 105Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 106Assert.Equal("ExistingValue2;InsertValue2", secondChild.Attributes["value"].Value);
PresentationBuildTasks (7)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (7)
806for (int i = 0; i < root.Attributes.Count; i++) 808XmlAttribute xmlAttribute = root.Attributes[i]; 829root.Attributes.Remove(xmlAttribute); 886nodeImport.Attributes.Append(projectAttribute); 887nodeImport.Attributes.Append(sdkAttributeProps); 893nodeImport.Attributes.Append(sdkVersionAttributeProps); 900nodeImport.Attributes.Append(sdkVersionAttributeProps);
System.Configuration.ConfigurationManager (8)
System\Configuration\HandlerBase.cs (5)
13XmlNode a = node.Attributes.RemoveNamedItem(attrib); 100if (node.Attributes.Count != 0) 103SR.Format(SR.Config_base_unrecognized_attribute, node.Attributes[0].Name), 112XmlNode attribute = node.Attributes.RemoveNamedItem(name); 130XmlNode attribute = node.Attributes.RemoveNamedItem(name);
System\Configuration\NameValueFileSectionHandler.cs (1)
25XmlNode fileAttribute = section.Attributes.RemoveNamedItem("file");
System\Configuration\RuntimeConfigurationRecord.cs (1)
123XmlAttributeCollection attributes = xmlNode.Attributes;
System\Configuration\SingleTagSectionHandler.cs (1)
40foreach (XmlAttribute attribute in section.Attributes)
System.Data.Common (11)
System\Data\XmlDataLoader.cs (2)
129for (int i = 0; i < node.Attributes!.Count; i++) 131if (!FExcludedNamespace(node.Attributes[i].NamespaceURI))
System\Xml\DataPointer.cs (3)
328return _node.Attributes!.Count; 360XmlNode? n = _node.Attributes!.Item(i); 664n = _node.Attributes!.GetNamedItem(_column.EncodedColumnName, _column.Namespace);
System\Xml\XmlDataDocument.cs (1)
1005newNode.Attributes!.Append((XmlAttribute)CloneTreeInternal(dp));
System\Xml\XPathNodePointer.cs (5)
528foreach (XmlAttribute attr in _node.Attributes!) 608Debug.Assert(_node.Attributes != null); 609XmlNode? n = _node.Attributes.GetNamedItem(localName, namespaceURI); 653XmlAttributeCollection attrs = _node.Attributes!; 1293n = _node.Attributes!.GetNamedItem(_column.EncodedColumnName, _column.Namespace);
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
999childNode.Attributes!.Append(AddNamespaceDeclaration(_attributesInXmlData.XsiTypePrefix, _attributesInXmlData.XsiTypeNamespace)); 1001childNode.Attributes!.Append(AddNamespaceDeclaration(_attributesInXmlData.FactoryTypePrefix, _attributesInXmlData.FactoryTypeNamespace));
System.Private.Xml (9)
System\Xml\Dom\XmlDocument.cs (4)
1032int cAttr = fromElem.Attributes!.Count; 1035if (fromElem.Attributes[iAttr].Specified) 1036toElem.Attributes!.SetNamedItem(ImportNodeInternal(fromElem.Attributes[iAttr], true));
System\Xml\Dom\XmlNodeReader.cs (5)
337return _elemNode!.Attributes!.Count; 727if (_attrIndex >= (_elemNode!.Attributes!.Count - 1)) 731_curNode = _elemNode.Attributes[++_attrIndex]; 737if (_curNode.Attributes!.Count > 0) 741_curNode = _curNode.Attributes[0];
System.Security.Cryptography.Xml (6)
System\Security\Cryptography\Xml\CanonicalXml.cs (2)
91XmlAttributeCollection? attribNodes = childNodes[i]!.Attributes; 98MarkNodeAsIncluded(childNodesCanonical[i]!.Attributes!.Item(j)!);
System\Security\Cryptography\Xml\ExcCanonicalXml.cs (2)
101XmlAttributeCollection? attribNodes = childNodes[i]!.Attributes; 108MarkNodeAsIncluded(childNodesCanonical[i]!.Attributes!.Item(j)!);
System\Security\Cryptography\Xml\Utils.cs (2)
283XmlAttributeCollection? attribNodes = rootNode.Attributes; 286foreach (XmlNode attribNode in rootNode.Attributes!)
System.Windows.Forms (1)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettingsTypeConverter.cs (1)
137XmlAttribute? attr = node.Attributes?[attribute];