StoryTeller.Engine.Frame.Collapse C# (CSharp) Method

Collapse() public method

public Collapse ( ) : void
return void
        public void Collapse()
        {
            if (_next != null)
            {
                _next.Collapse();

                if (_next.ExceptionText.IsNotEmpty())
                {
                    AppendException(_next.ExceptionText);
                }
            }

            _next = null;
        }

Usage Example

コード例 #1
0
ファイル: FrameTester.cs プロジェクト: adymitruk/storyteller
        public void collapse_with_a_single_child_brings_in_the_exception_text_and_removes_the_child()
        {
            var frame = new Frame();
            frame.Next().AppendException("some bad exception");

            frame.Collapse();

            frame.HasErrors().ShouldBeTrue();
            frame.ExceptionText.ShouldEqual("some bad exception");
        }
All Usage Examples Of StoryTeller.Engine.Frame::Collapse