当前位置: 首页>>代码示例>>C#>>正文


C# Wrapper.AddToEnd方法代码示例

本文整理汇总了C#中Wrapper.AddToEnd方法的典型用法代码示例。如果您正苦于以下问题:C# Wrapper.AddToEnd方法的具体用法?C# Wrapper.AddToEnd怎么用?C# Wrapper.AddToEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Wrapper的用法示例。


在下文中一共展示了Wrapper.AddToEnd方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

 public void SetUp()
 {
     node1 = new Wrapper(typeof(FakeJsonBehavior));
     node2 = new Wrapper(typeof(FakeJsonBehavior));
     node3 = new Wrapper(typeof(FakeJsonBehavior));
     node1.AddToEnd(node2);
     node1.AddToEnd(node3);
 }
开发者ID:DarthFubuMVC,项目名称:fubumvc,代码行数:8,代码来源:BehaviorNodeTester.cs

示例2: appending_a_node_also_sets_the_previous

        public void appending_a_node_also_sets_the_previous()
        {
            var chain = new BehaviorChain();
            var wrapper = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));

            chain.AddToEnd(wrapper);

            wrapper.Previous.ShouldBeNull();

            var wrapper2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));

            wrapper.AddToEnd(wrapper2);

            wrapper2.Previous.ShouldBeTheSameAs(wrapper);
            wrapper.Previous.ShouldBeNull();
        }
开发者ID:henninga,项目名称:fubumvc,代码行数:16,代码来源:BehaviorChainTester.cs

示例3: replacing_a_node_without_a_predecessor_should_set_the_new_node_to_the_front

        public void replacing_a_node_without_a_predecessor_should_set_the_new_node_to_the_front()
        {
            var node1 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var newNode = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            node1.AddToEnd(node2);
            node1.ReplaceWith(newNode);

            newNode.Previous.ShouldBeNull();
            newNode.Next.ShouldBeTheSameAs(node2);
        }
开发者ID:jorferreira,项目名称:fubumvc,代码行数:11,代码来源:BehaviorChainTester.cs

示例4: replacing_a_node_should_set_the_new_nodes_predecessor_and_successor

        public void replacing_a_node_should_set_the_new_nodes_predecessor_and_successor()
        {
            var node1 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node3 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var newNode = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            node1.AddToEnd(node2);
            node1.AddToEnd(node3);
            node2.ReplaceWith(newNode);

            newNode.Previous.ShouldBeTheSameAs(node1);
            newNode.Next.ShouldBeTheSameAs(node3);
            node1.Next.ShouldBeTheSameAs(newNode);
            node3.Previous.ShouldBeTheSameAs(newNode);
        }
开发者ID:jorferreira,项目名称:fubumvc,代码行数:15,代码来源:BehaviorChainTester.cs

示例5: replacing_a_node_should_disconnect_the_node_being_replaced

        public void replacing_a_node_should_disconnect_the_node_being_replaced()
        {
            var node1 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node3 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var newNode = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            node1.AddToEnd(node2);
            node1.AddToEnd(node3);
            node2.ReplaceWith(newNode);

            node2.Next.ShouldBeNull();
            node2.Previous.ShouldBeNull();
        }
开发者ID:jorferreira,项目名称:fubumvc,代码行数:13,代码来源:BehaviorChainTester.cs

示例6: removing_a_node_without_a_predecessor_sets_its_successor_to_the_front

        public void removing_a_node_without_a_predecessor_sets_its_successor_to_the_front()
        {
            var node1 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            node1.AddToEnd(node2);

            node1.Remove();

            node1.Previous.ShouldBeNull();
            node1.Next.ShouldBeNull();
            node2.Previous.ShouldBeNull();
        }
开发者ID:jorferreira,项目名称:fubumvc,代码行数:12,代码来源:BehaviorChainTester.cs

示例7: removing_a_node_maintains_the_link_between_its_predecessor_and_successor

        public void removing_a_node_maintains_the_link_between_its_predecessor_and_successor()
        {
            var node1 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node2 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            var node3 = new Wrapper(typeof (ObjectDefInstanceTester.FakeJsonBehavior));
            node1.AddToEnd(node2);
            node1.AddToEnd(node3);
            node2.Remove();

            node2.Previous.ShouldBeNull();
            node2.Next.ShouldBeNull();
            node1.Next.ShouldBeTheSameAs(node3);
            node3.Previous.ShouldBeTheSameAs(node1);
        }
开发者ID:jorferreira,项目名称:fubumvc,代码行数:14,代码来源:BehaviorChainTester.cs

示例8: 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);
        }
开发者ID:jorferreira,项目名称:fubumvc,代码行数:14,代码来源:BehaviorChainTester.cs


注:本文中的Wrapper.AddToEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。