コード例 #1
0
        private static IEnumerable <Delegate> GetAfterEachMethods(DescribeStackItem describeStackItem)
        {
            List <Delegate> result = new List <Delegate>();

            do
            {
                result.AddRange(describeStackItem.AfterEach);
                describeStackItem = describeStackItem.Parent;
            }while (describeStackItem != null);

            return(result);
        }
コード例 #2
0
        private static IEnumerable <Delegate> GetBeforeEachMethods(DescribeStackItem describeStackItem)
        {
            List <Delegate> result = new List <Delegate>();

            do
            {
                result.InsertRange(0, describeStackItem.BeforeEach);
                describeStackItem = describeStackItem.Parent;
            }while (describeStackItem != null);

            return(result);
        }