3 instantiations of XmlElementWithLocation
Microsoft.Build (3)
ElementLocation\XmlDocumentWithLocation.cs (3)
204return new XmlElementWithLocation(prefix, localName, namespaceURI, this, _reader.LineNumber, _reader.LinePosition); 208return new XmlElementWithLocation(prefix, localName, namespaceURI, this, _elementLocation.Value.Line, _elementLocation.Value.Column); 212return new XmlElementWithLocation(prefix, localName, namespaceURI, this);
137 references to XmlElementWithLocation
Microsoft.Build (134)
Construction\ProjectChooseElement.cs (1)
97XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.choose);
Construction\ProjectElement.cs (4)
66_xmlSource = (XmlElementWithLocation)xmlElement; 319internal XmlElementWithLocation XmlElement => _xmlSource?.Xml; 430internal void SetProjectRootElementFromParser(XmlElementWithLocation xmlElement, ProjectRootElement projectRootElement) 459internal void ReplaceElement(XmlElementWithLocation newElement)
Construction\ProjectElementContainer.cs (1)
578private static string GetElementIndentation(XmlElementWithLocation xmlElement)
Construction\ProjectExtensionsElement.cs (2)
183internal static ProjectExtensionsElement CreateParented(XmlElementWithLocation element, ProjectRootElement parent, ProjectRootElement containingProject) 194XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.projectExtensions);
Construction\ProjectImportElement.cs (4)
35internal ProjectImportElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject, SdkReference sdkReference = null) 45internal ProjectImportElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 146XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.import); 161XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.import);
Construction\ProjectImportGroupElement.cs (3)
31internal ProjectImportGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject) 40private ProjectImportGroupElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 78XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.importGroup);
Construction\ProjectItemDefinitionElement.cs (1)
104XmlElementWithLocation element = containingProject.CreateElement(itemType);
Construction\ProjectItemDefinitionGroupElement.cs (1)
69XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.itemDefinitionGroup);
Construction\ProjectItemElement.cs (4)
65internal ProjectItemElement(XmlElementWithLocation xmlElement, ProjectItemGroupElement parent, ProjectRootElement containingProject) 74private ProjectItemElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 427XmlElementWithLocation element = containingProject.CreateElement(itemType); 453XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, newItemType, XmlElement.NamespaceURI);
Construction\ProjectItemGroupElement.cs (3)
39internal ProjectItemGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject) 48private ProjectItemGroupElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 166XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.itemGroup);
Construction\ProjectMetadataElement.cs (4)
31internal ProjectMetadataElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement project) 40private ProjectMetadataElement(XmlElementWithLocation xmlElement, ProjectRootElement project) 109XmlElementWithLocation element = containingProject.CreateElement(name, location); 141XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, newName, XmlElement.NamespaceURI);
Construction\ProjectOnErrorElement.cs (3)
29internal ProjectOnErrorElement(XmlElementWithLocation xmlElement, ProjectTargetElement parent, ProjectRootElement project) 38private ProjectOnErrorElement(XmlElementWithLocation xmlElement, ProjectRootElement project) 76XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.onError);
Construction\ProjectOtherwiseElement.cs (3)
30internal ProjectOtherwiseElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement project) 39private ProjectOtherwiseElement(XmlElementWithLocation xmlElement, ProjectRootElement project) 90XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.otherwise);
Construction\ProjectOutputElement.cs (1)
148XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.output);
Construction\ProjectPropertyElement.cs (4)
39internal ProjectPropertyElement(XmlElementWithLocation xmlElement, ProjectPropertyGroupElement parent, ProjectRootElement containingProject) 48private ProjectPropertyElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 99XmlElementWithLocation element = containingProject.CreateElement(name); 123XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, newName, XmlElement.NamespaceURI);
Construction\ProjectPropertyGroupElement.cs (3)
31internal ProjectPropertyGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject) 40private ProjectPropertyGroupElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 99XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.propertyGroup);
Construction\ProjectRootElement.cs (2)
1792internal XmlElementWithLocation CreateElement(string name, ElementLocation location = null) 1795return (XmlElementWithLocation)XmlDocument.CreateElement(name, XmlNamespace, location);
Construction\ProjectSdkElement.cs (3)
27internal ProjectSdkElement(XmlElementWithLocation xmlElement, ProjectRootElement parent, 37private ProjectSdkElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 98var element = containingProject.CreateElement(XMakeElements.sdk);
Construction\ProjectTargetElement.cs (3)
41internal ProjectTargetElement(XmlElementWithLocation xmlElement, ProjectRootElement parent, ProjectRootElement containingProject) 50private ProjectTargetElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 406XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.target);
Construction\ProjectTaskElement.cs (3)
46internal ProjectTaskElement(XmlElementWithLocation xmlElement, ProjectTargetElement parent, ProjectRootElement containingProject) 55private ProjectTaskElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 416XmlElementWithLocation element = containingProject.CreateElement(name);
Construction\ProjectUsingTaskBodyElement.cs (3)
33internal ProjectUsingTaskBodyElement(XmlElementWithLocation xmlElement, ProjectUsingTaskElement parent, ProjectRootElement containingProject) 43private ProjectUsingTaskBodyElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 130XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.usingTaskBody);
Construction\ProjectUsingTaskElement.cs (3)
31internal ProjectUsingTaskElement(XmlElementWithLocation xmlElement, ProjectRootElement parent, ProjectRootElement containingProject) 40private ProjectUsingTaskElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 241XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.usingTask);
Construction\ProjectUsingTaskParameterElement.cs (4)
31internal ProjectUsingTaskParameterElement(XmlElementWithLocation xmlElement, UsingTaskParameterGroupElement parent, ProjectRootElement containingProject) 40private ProjectUsingTaskParameterElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 75XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, value, XmlElement.NamespaceURI); 175XmlElementWithLocation element = containingProject.CreateElement(parameterName);
Construction\ProjectWhenElement.cs (1)
69XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.when);
Construction\UsingTaskParameterGroupElement.cs (3)
32internal UsingTaskParameterGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject) 42private UsingTaskParameterGroupElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 103XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.usingTaskParameterGroup);
ElementLocation\XmlElementWithLocation.cs (1)
55XmlElementWithLocation ILinkedXml.Xml => this;
Evaluation\ProjectParser.cs (34)
130XmlElementWithLocation element = _document.DocumentElement as XmlElementWithLocation; 155foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 216private ProjectPropertyGroupElement ParseProjectPropertyGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 222foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 240private ProjectItemGroupElement ParseProjectItemGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 246foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 259private ProjectItemElement ParseProjectItemElement(XmlElementWithLocation element, ProjectItemGroupElement parent) 335foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 393private ProjectMetadataElement ParseProjectMetadataElement(XmlElementWithLocation element, ProjectElementContainer parent) 421private ProjectImportGroupElement ParseProjectImportGroupElement(XmlElementWithLocation element, ProjectRootElement parent) 427foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 447private ProjectImportElement ParseProjectImportElement(XmlElementWithLocation element, ProjectElementContainer parent) 475private UsingTaskParameterGroupElement ParseUsingTaskParameterGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 483foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 508private ProjectUsingTaskElement ParseProjectUsingTaskElement(XmlElementWithLocation element) 532foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 572private ProjectTargetElement ParseProjectTargetElement(XmlElementWithLocation element) 589foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 651private ProjectTaskElement ParseProjectTaskElement(XmlElementWithLocation element, ProjectTargetElement parent) 666foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 681private ProjectOutputElement ParseProjectOutputElement(XmlElementWithLocation element, ProjectTaskElement parent) 707private ProjectItemDefinitionGroupElement ParseProjectItemDefinitionGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 713foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 726private ProjectItemDefinitionElement ParseProjectItemDefinitionXml(XmlElementWithLocation element, ProjectItemDefinitionGroupElement parent) 756foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 769private ProjectChooseElement ParseProjectChooseElement(XmlElementWithLocation element, ProjectElementContainer parent, int nestingDepth) 781foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 815private ProjectWhenElement ParseProjectWhenElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) 829private ProjectOtherwiseElement ParseProjectOtherwiseElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) 843private void ParseWhenOtherwiseChildren(XmlElementWithLocation element, ProjectElementContainer parent, int nestingDepth) 845foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 879private ProjectExtensionsElement ParseProjectExtensionsElement(XmlElementWithLocation element) 895private ProjectSdkElement ParseProjectSdkElement(XmlElementWithLocation element)
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementLink.cs (3)
14/// <see cref="XmlElementWithLocation"/> and <see cref="ProjectElementLink"/> 29XmlElementWithLocation Xml { get; } 46XmlElementWithLocation ILinkedXml.Xml => null;
Utilities\Utilities.cs (3)
20using XmlElementWithLocation = Microsoft.Build.Construction.XmlElementWithLocation; 80internal static void SetXmlNodeInnerContents(XmlElementWithLocation node, string s) 110internal static string GetXmlNodeInnerContents(XmlElementWithLocation node)
Xml\ProjectXmlUtilities.cs (15)
42internal static XmlElementChildIterator GetVerifyThrowProjectChildElements(XmlElementWithLocation element) 51private static XmlElementChildIterator GetChildElements(XmlElementWithLocation element, bool throwForInvalidNodeTypes) 59internal static void VerifyThrowProjectNoChildElements(XmlElementWithLocation element) 61foreach (var child in GetVerifyThrowProjectChildElements(element)) 71internal static void ThrowProjectInvalidChildElementDueToDuplicate(XmlElementWithLocation child) 89internal static bool VerifyValidProjectNamespace(XmlElementWithLocation element) 127internal static void VerifyThrowProjectAttributeEitherMissingOrNotEmpty(XmlElementWithLocation xmlElement, string attributeName) 135internal static void VerifyThrowProjectAttributeEitherMissingOrNotEmpty(XmlElementWithLocation xmlElement, XmlAttributeWithLocation attribute, string attributeName) 149internal static void VerifyThrowProjectNoAttributes(XmlElementWithLocation element) 175internal static void VerifyThrowProjectRequiredAttribute(XmlElementWithLocation element, string attributeName) 183internal static void VerifyThrowProjectAttributes(XmlElementWithLocation element, HashSet<string> validAttributes) 204internal static XmlAttributeWithLocation SetOrRemoveAttribute(XmlElementWithLocation element, string name, string value) 214internal static XmlAttributeWithLocation SetOrRemoveAttribute(XmlElementWithLocation element, string name, string value, bool allowSettingEmptyAttributes) 251internal static string GetAttributeValue(XmlElementWithLocation element, string attributeName) 261internal static string GetAttributeValue(XmlElementWithLocation element, string attributeName, bool nullIfNotExists)
Xml\ProjectXmlUtilities.XmlElementChildIterator.cs (6)
22private readonly XmlElementWithLocation _element; 24private XmlElementWithLocation _current; 31internal XmlElementChildIterator(XmlElementWithLocation element, bool throwForInvalidNodeTypes) 66public readonly XmlElementWithLocation Current 76private readonly XmlElementWithLocation GetNextNode(XmlNode child) 88return (XmlElementWithLocation)child;
XmlUtilities.cs (5)
28internal static XmlElementWithLocation RenameXmlElement(XmlElementWithLocation oldElement, string newElementName, string xmlNamespace) 35XmlElementWithLocation newElement = 36(XmlElementWithLocation)((XmlDocumentWithLocation)oldElement.OwnerDocument).CreateElement(newElementName, xmlNamespace ?? string.Empty, oldElement.Location); 107internal static void VerifyThrowProjectValidElementName(XmlElementWithLocation element)
Microsoft.Build.Engine.UnitTests (3)
Utilities_Tests.cs (3)
16using XmlElementWithLocation = Microsoft.Build.Construction.XmlElementWithLocation; 330XmlElementWithLocation rootElement = (XmlElementWithLocation)xmldoc.FirstChild;