本文整理汇总了C#中FubuCore.Descriptions.Description.AcceptVisitor方法的典型用法代码示例。如果您正苦于以下问题:C# Description.AcceptVisitor方法的具体用法?C# Description.AcceptVisitor怎么用?C# Description.AcceptVisitor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FubuCore.Descriptions.Description
的用法示例。
在下文中一共展示了Description.AcceptVisitor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DescriptionTextWriter
public DescriptionTextWriter(Description description)
{
if (!description.IsMultiLevel())
{
_report.AddText(description.ToString());
}
else
{
description.AcceptVisitor(this);
}
}
示例2: DescriptionTextWriter
public DescriptionTextWriter(Description description)
{
if (description.IsMultiLevel())
{
description.AcceptVisitor(this);
}
else
{
this.As<IDescriptionVisitor>().Start(description);
}
}
示例3: accept_visitor_if_it_only_has_itself
public void accept_visitor_if_it_only_has_itself()
{
var repo = new MockRepository();
var visitor = repo.StrictMock<IDescriptionVisitor>();
var description = new Description();
using (repo.Record())
{
visitor.Start(description);
visitor.End();
}
using (repo.Playback())
{
description.AcceptVisitor(visitor);
}
}
示例4: accept_visitory_with_multiple_bullet_lists
public void accept_visitory_with_multiple_bullet_lists()
{
var repo = new MockRepository();
var visitor = repo.StrictMock<IDescriptionVisitor>();
var description = new Description();
var list = new BulletList();
list.Children.Add(new Description());
list.Children.Add(new Description());
list.Children.Add(new Description());
description.BulletLists.Add(list);
description.BulletLists.Add(new BulletList());
using (repo.Record())
{
visitor.Start(description);
visitor.StartList(list);
visitor.Start(list.Children[0]);
visitor.End();
visitor.Start(list.Children[1]);
visitor.End();
visitor.Start(list.Children[2]);
visitor.End();
visitor.EndList();
visitor.StartList(description.BulletLists.Last());
visitor.EndList();
visitor.End();
}
using (repo.Playback())
{
description.AcceptVisitor(visitor);
}
}