1 override of Attributes
System.Private.Xml (1)
System\Xml\Dom\XmlElement.cs (1)
238public override XmlAttributeCollection Attributes
134 references to Attributes
aspire (10)
Projects\ProjectUpdater.cs (10)
309var sdkAttribute = projectNode.Attributes?["Sdk"]; 418var sdkAttribute = projectNode.Attributes?["Sdk"]; 445projectNode.Attributes!.SetNamedItem(newSdkAttribute); 768var versionAttribute = packageVersionNode?.Attributes?["Version"]?.Value; 867if (packageVersionNode?.Attributes?["Version"] is null) 872packageVersionNode.Attributes["Version"]!.Value = newVersion; 960var key = addNode.Attributes?["key"]?.Value; 961var value = addNode.Attributes?["value"]?.Value; 989var sourceKey = packageSourceNode.Attributes?["key"]?.Value; 998var pattern = packageNode.Attributes?["pattern"]?.Value;
Microsoft.Build (3)
Evaluation\Preprocessor.cs (3)
353if (clone.NodeType == XmlNodeType.Element && String.Equals(XMakeElements.project, child.Name, StringComparison.Ordinal) && clone.Attributes?[XMakeAttributes.sdk] != null) 355clone.Attributes.Remove(clone.Attributes[XMakeAttributes.sdk]);
Microsoft.Build.Tasks.Core (50)
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)); 1645var attribute = (XmlAttribute)(node.Attributes.GetNamedItem(attributeName)); 1767_results?.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.NoStringsForCulture", resourcesNode.Attributes.GetNamedItem("Culture").Value)); 1775XmlAttribute resourceIdAttribute = (XmlAttribute)stringNode.Attributes.GetNamedItem("Name"); 1908XmlAttribute oldNameAttribute = (XmlAttribute)(sourceNode.Attributes.GetNamedItem(sourceOldName)); 1909XmlAttribute newNameAttribute = (XmlAttribute)(sourceNode.Attributes.GetNamedItem(sourceNewName)); 1948node.Attributes.Append(attrib); 2078XmlAttribute homesiteAttribute = packageFileNode.Attributes[HOMESITE_ATTRIBUTE]; 2091XmlAttribute hashAttribute = packageFileNode.Attributes[HASH_ATTRIBUTE]; 2092XmlAttribute publicKeyAttribute = packageFileNode.Attributes[PUBLICKEY_ATTRIBUTE]; 2119packageFileNode.Attributes.RemoveNamedItem(PUBLICKEY_ATTRIBUTE); 2189if (currentNode.Attributes.Count == 0 && currentNode.InnerText.Length > 0)
GenerateApplicationManifest.cs (1)
473var attr = (XmlAttribute)(node.Attributes.GetNamedItem("level"));
ManifestUtil\DeployManifest.cs (1)
222XmlAttribute nameattr = fileListNode?.Attributes["InstallableFramework"];
XmlPeek.cs (2)
200XmlAttribute prefix = xn.Attributes?[prefixAttr]; 207XmlAttribute uri = xn.Attributes[uriAttr];
XmlPoke.cs (2)
188XmlAttribute prefix = xn.Attributes?[prefixAttr]; 195XmlAttribute uri = xn.Attributes[uriAttr];
XslTransformation.cs (6)
243if (xn.Attributes["Name"] == null) 248if (xn.Attributes["Value"] == null) 254if (xn.Attributes["Namespace"] != null) 256ns = xn.Attributes["Namespace"].Value; 259arguments.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.TestPlatform.Extensions.BlameDataCollector (5)
XmlReaderWriter.cs (5)
130if (node?.Attributes == null) 138node.Attributes[Constants.TestNameAttribute]?.Value, 139Source = node.Attributes[Constants.TestSourceAttribute]?.Value, 140DisplayName = node.Attributes[Constants.TestDisplayNameAttribute]?.Value, 141IsCompleted = node.Attributes[Constants.TestCompletedAttribute]?.Value == "True"
Microsoft.TestPlatform.Utilities (3)
CodeCoverageRunSettingsProcessor.cs (2)
224if (node.Attributes == null) 229foreach (XmlAttribute attribute in node.Attributes)
InferRunSettingsHelper.cs (1)
734foreach (XmlAttribute attribute in dataCollectorNode.Attributes!)
Microsoft.VisualStudio.TestPlatform.Common (2)
Utilities\RunSettingsProviderExtensions.cs (2)
133if (string.Compare(node.Attributes![NameString]!.Value, attrName) == 0) 135node.Attributes[ValueString]!.Value = attrValue;
Microsoft.Web.XmlTransform (11)
XmlElementContext.cs (3)
221if (node.Attributes != null) { 223foreach (XmlAttribute attribute in node.Attributes) { 235node.Attributes.Remove(attributeToRemove);
XmlLocators.cs (1)
36XmlAttribute keyAttribute = CurrentElement.Attributes.GetNamedItem(key) as XmlAttribute;
XmlTransforms.cs (7)
165XmlAttribute targetAttribute = TargetNode.Attributes.GetNamedItem(transformAttribute.Name) as XmlAttribute; 170TargetNode.Attributes.Append((XmlAttribute)transformAttribute.Clone()); 272XmlAttribute targetAttribute = TargetNode.Attributes.GetNamedItem(transformAttribute.Name) as XmlAttribute; 284TargetNode.Attributes.Append(newAttribute); 347XmlAttribute sourceAttribute = TargetNode.Attributes.GetNamedItem(attributeName) as XmlAttribute; 352sourceAttribute = TransformNode.Attributes.GetNamedItem(attributeName) as XmlAttribute; 632TargetNode.Attributes.Remove(attribute);
PresentationBuildTasks (7)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (7)
795for (int i = 0; i < root.Attributes.Count; i++) 797XmlAttribute xmlAttribute = root.Attributes[i]; 818root.Attributes.Remove(xmlAttribute); 875nodeImport.Attributes.Append(projectAttribute); 876nodeImport.Attributes.Append(sdkAttributeProps); 882nodeImport.Attributes.Append(sdkVersionAttributeProps); 889nodeImport.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)
997childNode.Attributes!.Append(AddNamespaceDeclaration(_attributesInXmlData.XsiTypePrefix, _attributesInXmlData.XsiTypeNamespace)); 999childNode.Attributes!.Append(AddNamespaceDeclaration(_attributesInXmlData.FactoryTypePrefix, _attributesInXmlData.FactoryTypeNamespace));
System.Private.Xml (9)
System\Xml\Dom\XmlDocument.cs (4)
1028int cAttr = fromElem.Attributes!.Count; 1031if (fromElem.Attributes[iAttr].Specified) 1032toElem.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)
82XmlAttributeCollection? attribNodes = childNodes[i]!.Attributes; 89MarkNodeAsIncluded(childNodesCanonical[i]!.Attributes!.Item(j)!);
System\Security\Cryptography\Xml\ExcCanonicalXml.cs (2)
92XmlAttributeCollection? attribNodes = childNodes[i]!.Attributes; 99MarkNodeAsIncluded(childNodesCanonical[i]!.Attributes!.Item(j)!);
System\Security\Cryptography\Xml\Utils.cs (2)
271XmlAttributeCollection? attribNodes = rootNode.Attributes; 274foreach (XmlNode attribNode in rootNode.Attributes!)
System.Windows.Forms (1)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettingsTypeConverter.cs (1)
137XmlAttribute? attr = node.Attributes?[attribute];