Added HtmlTagWrapper.AddChildren and HtmlTagWrapper.AddChildrenAt methods

This commit is contained in:
agrath@gmail.com
2011-06-16 11:02:23 -02:00
parent d4ed1efcf5
commit 940239f1f2

View File

@@ -154,6 +154,11 @@ namespace umbraco.MacroEngines
Children.Add(newChild);
return this;
}
public HtmlTagWrapper AddChildren(params HtmlTagWrapperBase[] collection)
{
Children.AddRange(collection);
return this;
}
public HtmlTagWrapper AddChild(string text)
{
Children.Add(new HtmlTagWrapperTextNode(text));
@@ -169,6 +174,11 @@ namespace umbraco.MacroEngines
Children.Insert(index, new HtmlTagWrapperTextNode(text));
return this;
}
public HtmlTagWrapper AddChildrenAt(int index, params HtmlTagWrapperBase[] collection)
{
Children.InsertRange(index, collection);
return this;
}
public HtmlTagWrapper RemoveChildAt(int index)
{
return this;