コード例 #1
0
        public static IEnumerable <T> WithExpressionStatementOfType <T>(this StatementCollection source) where T : Expression
        {
            var found = source.OfType <ExpressionStatement>().Where(stmt => stmt.Expression.GetType() == typeof(T));

            return(found.Select(stmt => (T)stmt.Expression));
        }