/// <summary> /// Parses the current XmlTextReader node if it /// is the NAnt Target element. /// </summary> void ParseTargetElement(XmlTextReader xmlReader) { int line = xmlReader.LineNumber; int col = xmlReader.LinePosition; string targetName = GetAttribute(xmlReader, NameAttributeName); bool isDefaultTarget = IsDefaultTargetName(defaultTargetName, targetName); NAntBuildTarget target = new NAntBuildTarget(targetName, isDefaultTarget, line, col); targets.Add(target); if (isDefaultTarget) { defaultTarget = target; } }
/// <summary> /// Parses the current XmlTextReader node if it /// is the NAnt Target element. /// </summary> void ParseTargetElement(XmlTextReader xmlReader) { // Take off one for line/col since SharpDevelop is zero based. int line = xmlReader.LineNumber - 1; int col = xmlReader.LinePosition - 1; string targetName = GetAttribute(xmlReader, NameAttributeName); bool isDefaultTarget = IsDefaultTargetName(defaultTargetName, targetName); NAntBuildTarget target = new NAntBuildTarget(targetName, isDefaultTarget, line, col); targets.Add(target); if (isDefaultTarget) { defaultTarget = target; } }