3 instantiations of XmlElementWithLocation
Microsoft.Build (3)
ElementLocation\XmlDocumentWithLocation.cs (3)
206return new XmlElementWithLocation(prefix, localName, namespaceURI, this, _reader.LineNumber, _reader.LinePosition); 210return new XmlElementWithLocation(prefix, localName, namespaceURI, this, _elementLocation.Value.Line, _elementLocation.Value.Column); 214return new XmlElementWithLocation(prefix, localName, namespaceURI, this);
134 references to XmlElementWithLocation
Microsoft.Build (134)
Construction\ProjectChooseElement.cs (1)
92XmlElementWithLocation 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)
587private static string GetElementIndentation(XmlElementWithLocation xmlElement)
Construction\ProjectExtensionsElement.cs (2)
177internal static ProjectExtensionsElement CreateParented(XmlElementWithLocation element, ProjectRootElement parent, ProjectRootElement containingProject) 188XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.projectExtensions);
Construction\ProjectImportElement.cs (4)
36internal ProjectImportElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject, SdkReference sdkReference = null) 46internal ProjectImportElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 147XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.import); 162XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.import);
Construction\ProjectImportGroupElement.cs (3)
32internal ProjectImportGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject) 41private ProjectImportGroupElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 79XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.importGroup);
Construction\ProjectItemDefinitionElement.cs (1)
105XmlElementWithLocation element = containingProject.CreateElement(itemType);
Construction\ProjectItemDefinitionGroupElement.cs (1)
70XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.itemDefinitionGroup);
Construction\ProjectItemElement.cs (4)
65internal ProjectItemElement(XmlElementWithLocation xmlElement, ProjectItemGroupElement parent, ProjectRootElement containingProject) 74private ProjectItemElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 432XmlElementWithLocation element = containingProject.CreateElement(itemType); 458XmlElementWithLocation 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)
33internal ProjectMetadataElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement project) 42private ProjectMetadataElement(XmlElementWithLocation xmlElement, ProjectRootElement project) 111XmlElementWithLocation element = containingProject.CreateElement(name, location); 143XmlElementWithLocation newElement = XmlUtilities.RenameXmlElement(XmlElement, newName, XmlElement.NamespaceURI);
Construction\ProjectOnErrorElement.cs (3)
30internal ProjectOnErrorElement(XmlElementWithLocation xmlElement, ProjectTargetElement parent, ProjectRootElement project) 39private ProjectOnErrorElement(XmlElementWithLocation xmlElement, ProjectRootElement project) 77XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.onError);
Construction\ProjectOtherwiseElement.cs (3)
31internal ProjectOtherwiseElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement project) 40private ProjectOtherwiseElement(XmlElementWithLocation xmlElement, ProjectRootElement project) 85XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.otherwise);
Construction\ProjectOutputElement.cs (1)
148XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.output);
Construction\ProjectPropertyElement.cs (4)
40internal ProjectPropertyElement(XmlElementWithLocation xmlElement, ProjectPropertyGroupElement parent, ProjectRootElement containingProject) 49private ProjectPropertyElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 100XmlElementWithLocation element = containingProject.CreateElement(name); 124XmlElementWithLocation 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)
1818internal XmlElementWithLocation CreateElement(string name, ElementLocation location = null) 1821return (XmlElementWithLocation)XmlDocument.CreateElement(name, XmlNamespace, location);
Construction\ProjectSdkElement.cs (3)
28internal ProjectSdkElement(XmlElementWithLocation xmlElement, ProjectRootElement parent, 38private ProjectSdkElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 99var 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)
34internal ProjectUsingTaskBodyElement(XmlElementWithLocation xmlElement, ProjectUsingTaskElement parent, ProjectRootElement containingProject) 44private ProjectUsingTaskBodyElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 125XmlElementWithLocation 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); 169XmlElementWithLocation element = containingProject.CreateElement(parameterName);
Construction\ProjectWhenElement.cs (1)
70XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.when);
Construction\UsingTaskParameterGroupElement.cs (3)
32internal UsingTaskParameterGroupElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject) 42private UsingTaskParameterGroupElement(XmlElementWithLocation xmlElement, ProjectRootElement containingProject) 97XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.usingTaskParameterGroup);
ElementLocation\XmlElementWithLocation.cs (1)
55XmlElementWithLocation ILinkedXml.Xml => this;
Evaluation\ProjectParser.cs (34)
134XmlElementWithLocation element = _document.DocumentElement as XmlElementWithLocation; 159foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 224private ProjectPropertyGroupElement ParseProjectPropertyGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 230foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 248private ProjectItemGroupElement ParseProjectItemGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 254foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 267private ProjectItemElement ParseProjectItemElement(XmlElementWithLocation element, ProjectItemGroupElement parent) 346foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 404private ProjectMetadataElement ParseProjectMetadataElement(XmlElementWithLocation element, ProjectElementContainer parent) 432private ProjectImportGroupElement ParseProjectImportGroupElement(XmlElementWithLocation element, ProjectRootElement parent) 438foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 465private ProjectImportElement ParseProjectImportElement(XmlElementWithLocation element, ProjectElementContainer parent) 493private UsingTaskParameterGroupElement ParseUsingTaskParameterGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 501foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 526private ProjectUsingTaskElement ParseProjectUsingTaskElement(XmlElementWithLocation element) 550foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 594private ProjectTargetElement ParseProjectTargetElement(XmlElementWithLocation element) 611foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 673private ProjectTaskElement ParseProjectTaskElement(XmlElementWithLocation element, ProjectTargetElement parent) 688foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 711private ProjectOutputElement ParseProjectOutputElement(XmlElementWithLocation element, ProjectTaskElement parent) 737private ProjectItemDefinitionGroupElement ParseProjectItemDefinitionGroupElement(XmlElementWithLocation element, ProjectElementContainer parent) 743foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 756private ProjectItemDefinitionElement ParseProjectItemDefinitionXml(XmlElementWithLocation element, ProjectItemDefinitionGroupElement parent) 792foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 805private ProjectChooseElement ParseProjectChooseElement(XmlElementWithLocation element, ProjectElementContainer parent, int nestingDepth) 817foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 855private ProjectWhenElement ParseProjectWhenElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) 869private ProjectOtherwiseElement ParseProjectOtherwiseElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) 883private void ParseWhenOtherwiseChildren(XmlElementWithLocation element, ProjectElementContainer parent, int nestingDepth) 885foreach (XmlElementWithLocation childElement in ProjectXmlUtilities.GetVerifyThrowProjectChildElements(element)) 923private ProjectExtensionsElement ParseProjectExtensionsElement(XmlElementWithLocation element) 939private 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)
23using XmlElementWithLocation = Microsoft.Build.Construction.XmlElementWithLocation; 83internal static void SetXmlNodeInnerContents(XmlElementWithLocation node, string s) 113internal static string GetXmlNodeInnerContents(XmlElementWithLocation node)
Utilities\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)
Xml\ProjectXmlUtilities.cs (15)
42internal static XmlElementChildIterator GetVerifyThrowProjectChildElements(XmlElementWithLocation element) 51private static XmlElementChildIterator GetChildElements(XmlElementWithLocation element, bool throwForInvalidNodeTypes) 59internal static void VerifyThrowProjectNoChildElements(XmlElementWithLocation element, ParserIgnoreConfiguration config) 61foreach (var child in GetVerifyThrowProjectChildElements(element)) 71internal static void ThrowProjectInvalidChildElementDueToDuplicate(XmlElementWithLocation child) 81internal static bool VerifyValidProjectNamespace(XmlElementWithLocation element) 119internal static void VerifyThrowProjectAttributeEitherMissingOrNotEmpty(XmlElementWithLocation xmlElement, string attributeName) 127internal static void VerifyThrowProjectAttributeEitherMissingOrNotEmpty(XmlElementWithLocation xmlElement, XmlAttributeWithLocation attribute, string attributeName) 141internal static void VerifyThrowProjectNoAttributes(XmlElementWithLocation element, ParserIgnoreConfiguration config) 172internal static void VerifyThrowProjectRequiredAttribute(XmlElementWithLocation element, string attributeName) 181internal static void VerifyThrowProjectAttributes(XmlElementWithLocation element, HashSet<string> validAttributes, ParserIgnoreConfiguration config, string genericElementName = null) 227internal static XmlAttributeWithLocation SetOrRemoveAttribute(XmlElementWithLocation element, string name, string value) 237internal static XmlAttributeWithLocation SetOrRemoveAttribute(XmlElementWithLocation element, string name, string value, bool allowSettingEmptyAttributes) 274internal static string GetAttributeValue(XmlElementWithLocation element, string attributeName) 284internal 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;