/// <summary> /// Convenience method to add a conditioned Output Property to this task. /// Adds after the last child. /// </summary> public ProjectOutputElement AddOutputProperty(string taskParameter, string propertyName, string condition) { ProjectOutputElement outputProperty = ContainingProject.CreateOutputElement(taskParameter, null, propertyName); if (condition != null) { outputProperty.Condition = condition; } AppendChild(outputProperty); return(outputProperty); }
/// <summary> /// Convenience method to add a conditioned Output Item to this task. /// Adds after the last child. /// </summary> public ProjectOutputElement AddOutputItem(string taskParameter, string itemType, string condition) { ProjectOutputElement outputItem = ContainingProject.CreateOutputElement(taskParameter, itemType, null); if (condition != null) { outputItem.Condition = condition; } AppendChild(outputItem); return(outputItem); }
internal override ProjectElement LoadChildElement(string name) { switch (name) { case "Output": var output = ContainingProject.CreateOutputElement(null, null, null); AppendChild(output); return(output); default: throw new InvalidProjectFileException(string.Format( "Child \"{0}\" is not a known node type.", name)); } }