示例#1
0
		internal MSBuildProperty (MSBuildNode parentNode, string name, string value, string evaluatedValue): this ()
		{
			ParentNode = parentNode;
			this.name = name;
			this.unevaluatedValue = value;
			this.value = evaluatedValue;
		}
示例#2
0
 internal MSBuildProperty(MSBuildNode parentNode, string name, string value, string evaluatedValue) : this()
 {
     ParentNode            = parentNode;
     this.name             = name;
     this.unevaluatedValue = value;
     this.value            = evaluatedValue;
 }
示例#3
0
 internal MSBuildProperty(MSBuildNode parentNode, string name, string value, string evaluatedValue, bool fromAttribute, string afterAttribute) : this()
 {
     ParentNode            = parentNode;
     this.name             = name;
     this.unevaluatedValue = value;
     this.value            = evaluatedValue;
     this.fromAttribute    = fromAttribute;
     this.afterAttribute   = afterAttribute;
 }
示例#4
0
        internal virtual MSBuildNode GetPreviousSibling()
        {
            var p = ParentObject;

            if (p != null)
            {
                MSBuildNode last = null;
                foreach (var c in p.GetChildren())
                {
                    if (c == this)
                    {
                        return(last);
                    }
                    last = c;
                }
            }
            return(null);
        }
		internal void ResetIndent (bool closeInNewLine, MSBuildProject project, MSBuildObject parent, MSBuildNode previousSibling)
		{
			StartInnerWhitespace = StartWhitespace = EndWhitespace = EndInnerWhitespace = null;

			if (previousSibling != null) {
				StartWhitespace = previousSibling.StartWhitespace;
				if (closeInNewLine)
					EndInnerWhitespace = StartWhitespace;
			} else if (parent != null) {
				if (parent.StartInnerWhitespace == null) {
					parent.StartInnerWhitespace = project.TextFormat.NewLine;
					parent.EndInnerWhitespace = parent.StartWhitespace;
				}
				object parentStartWhitespace = (parent != project) ? parent.StartWhitespace : "";
				StartWhitespace = parentStartWhitespace + "  ";
				if (closeInNewLine)
					EndInnerWhitespace = StartWhitespace;
			}
			EndWhitespace = project.TextFormat.NewLine;
			if (closeInNewLine)
				StartInnerWhitespace = project.TextFormat.NewLine;

			ResetChildrenIndent ();
		}
示例#6
0
        internal void ResetIndent(bool closeInNewLine, MSBuildProject project, MSBuildObject parent, MSBuildNode previousSibling)
        {
            StartInnerWhitespace = StartWhitespace = EndWhitespace = EndInnerWhitespace = null;

            if (previousSibling != null)
            {
                StartWhitespace = previousSibling.StartWhitespace;
                if (closeInNewLine)
                {
                    EndInnerWhitespace = StartWhitespace;
                }
            }
            else if (parent != null)
            {
                if (parent.StartInnerWhitespace == null)
                {
                    parent.StartInnerWhitespace = project.TextFormat.NewLine;
                    parent.EndInnerWhitespace   = parent.StartWhitespace;
                }
                object parentStartWhitespace = (parent != project) ? parent.StartWhitespace : "";
                StartWhitespace = parentStartWhitespace + "  ";
                if (closeInNewLine)
                {
                    EndInnerWhitespace = StartWhitespace;
                }
            }
            EndWhitespace = project.TextFormat.NewLine;
            if (closeInNewLine)
            {
                StartInnerWhitespace = project.TextFormat.NewLine;
            }

            ResetChildrenIndent();
        }