Пример #1
0
        public static bool TryFindArgumentsWithin(Expression expression, out object[] arguments)
        {
            Debug.Assert(expression != null);

            var visitor = new ArgumentsVisitor();

            try
            {
                visitor.Visit(expression);
                arguments = visitor.arguments;

                return(arguments != null);
            }
            catch (Exception)
            {
            }

            arguments = null;
            return(false);
        }
Пример #2
0
        public static bool TryFindArgumentsWithin(Expression expression, out object[] arguments)
        {
            Debug.Assert(expression != null);

            var visitor = new ArgumentsVisitor();

            try
            {
                visitor.Visit(expression);
                arguments = visitor.arguments;

                return arguments != null;
            }
            catch (Exception)
            {
            }

            arguments = null;
            return false;
        }