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); }
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); }