本文整理汇总了C#中HtmlTag.After方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTag.After方法的具体用法?C# HtmlTag.After怎么用?C# HtmlTag.After使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlTag
的用法示例。
在下文中一共展示了HtmlTag.After方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: set_the_next_sibling_via_the_after_method_preserves_any_existing_sibling
public void set_the_next_sibling_via_the_after_method_preserves_any_existing_sibling()
{
var tag = new HtmlTag("span").Text("something");
tag.After(new HtmlTag("span").Text("first brother"));
tag.After(new HtmlTag("span").Text("second brother"));
tag.ToString().ShouldEqual("<span>something</span><span>second brother</span><span>first brother</span>");
}
示例2: set_the_next_sibling_via_the_after_method
public void set_the_next_sibling_via_the_after_method()
{
var tag = new HtmlTag("span").Text("something");
tag.After(new HtmlTag("span").Text("next"));
tag.ToString().ShouldEqual("<span>something</span><span>next</span>");
}
示例3: get_the_next_sibling_via_property_is_equivelent_to_after
public void get_the_next_sibling_via_property_is_equivelent_to_after()
{
var tag = new HtmlTag("span").Text("something");
var nextSibling = new HtmlTag("span").Text("first brother");
tag.After(nextSibling);
tag.Next.ShouldBeTheSameAs(nextSibling);
}
示例4: retrieve_the_next_sibling
public void retrieve_the_next_sibling()
{
var tag = new HtmlTag("span").Text("something");
var nextSibling = new HtmlTag("span").Text("first brother");
tag.After(nextSibling);
tag.After().ShouldBeTheSameAs(nextSibling);
}
示例5: does_not_return_children_or_siblings_when_treated_as_a_tag_source
public void does_not_return_children_or_siblings_when_treated_as_a_tag_source()
{
var original = new HtmlTag("div");
original.Add("span");
original.After(new HtmlTag("p"));
var tagSource = (ITagSource) original;
var allTags = tagSource.AllTags().ToArray();
allTags.ShouldHaveCount(1);
allTags[0].ShouldBeTheSameAs(original);
}