本文整理汇总了C#中Wrapper.ParentChain方法的典型用法代码示例。如果您正苦于以下问题:C# Wrapper.ParentChain方法的具体用法?C# Wrapper.ParentChain怎么用?C# Wrapper.ParentChain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wrapper
的用法示例。
在下文中一共展示了Wrapper.ParentChain方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: appending_a_node_also_sets_the_previous_2
public void appending_a_node_also_sets_the_previous_2()
{
var chain = new BehaviorChain();
var wrapper = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
chain.AddToEnd(wrapper);
wrapper.Previous.ShouldBeNull();
wrapper.ParentChain().ShouldBeTheSameAs(chain);
var wrapper2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
chain.AddToEnd(wrapper2);
wrapper2.Previous.ShouldBeTheSameAs(wrapper);
wrapper.Previous.ShouldBeNull();
wrapper.ParentChain().ShouldBeTheSameAs(chain);
}
示例2: adding_a_node_to_the_end_sets_the_chain_on_the_node
public void adding_a_node_to_the_end_sets_the_chain_on_the_node()
{
var chain = new BehaviorChain();
var wrapper = new Wrapper(typeof(ObjectDefInstanceTester.FakeJsonBehavior));
chain.AddToEnd(wrapper);
wrapper.ParentChain().ShouldBeTheSameAs(chain);
}
示例3: find_the_parent_from_deep_in_behavior_chain
public void find_the_parent_from_deep_in_behavior_chain()
{
var chain = new BehaviorChain();
var node = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
chain.AddToEnd(node);
var node2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
node.AddToEnd(node2);
var node3 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
node2.AddToEnd(node3);
node3.ParentChain().ShouldBeTheSameAs(chain);
}
示例4: find_the_parent_chain_when_the_chain_is_the_immediate_parent
public void find_the_parent_chain_when_the_chain_is_the_immediate_parent()
{
var chain = new BehaviorChain();
var node = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
chain.AddToEnd(node);
node.ParentChain().ShouldBeTheSameAs(chain);
}
示例5: find_the_chain_when_the_parent_is_null_should_be_null
public void find_the_chain_when_the_parent_is_null_should_be_null()
{
var node = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
node.ParentChain().ShouldBeNull();
}