/// <summary> /// Parse a ProjectWhenElement /// </summary> private ProjectWhenElement ParseProjectWhenElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) { ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element, XMakeAttributes.condition); ProjectWhenElement when = new ProjectWhenElement(element, parent, _project); ParseWhenOtherwiseChildren(element, when, nestingDepth); return(when); }
/// <summary> /// Creates an unparented ProjectPropertyGroupElement, wrapping an unparented XmlElement. /// Caller should then ensure the element is added to a parent /// </summary> internal static ProjectWhenElement CreateDisconnected(string condition, ProjectRootElement containingProject) { XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.when); ProjectWhenElement when = new ProjectWhenElement(element, containingProject); when.Condition = condition; return(when); }
/// <summary> /// Parse a ProjectWhenElement /// </summary> private ProjectWhenElement ParseProjectWhenElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) { ProjectXmlUtilities.VerifyThrowProjectRequiredAttribute(element, XMakeAttributes.condition); ProjectWhenElement when = new ProjectWhenElement(element, parent, _project); ParseWhenOtherwiseChildren(element, when, nestingDepth); return when; }
/// <summary> /// Creates an unparented ProjectPropertyGroupElement, wrapping an unparented XmlElement. /// Caller should then ensure the element is added to a parent /// </summary> internal static ProjectWhenElement CreateDisconnected(string condition, ProjectRootElement containingProject) { XmlElementWithLocation element = containingProject.CreateElement(XMakeElements.when); ProjectWhenElement when = new ProjectWhenElement(element, containingProject); when.Condition = condition; return when; }