Exemplo n.º 1
0
        public static bool TryFindArgumentFiltersWithin(Expression expression, out ArgumentFilterCollection argumentFilters)
        {
            Debug.Assert(expression != null);

            var visitor = new ArgumentFiltersVisitor();

            try
            {
                visitor.Visit(expression);
                argumentFilters = visitor.argumentFilters;
                return(argumentFilters != null && argumentFilters.All(x => x != null));
            }
            catch (Exception)
            {
            }

            argumentFilters = null;
            return(false);
        }
Exemplo n.º 2
0
        public static bool TryFindArgumentFiltersWithin(Expression expression, out ArgumentFilterCollection argumentFilters)
        {
            Debug.Assert(expression != null);

            var visitor = new ArgumentFiltersVisitor();

            try
            {
                visitor.Visit(expression);
                argumentFilters = visitor.argumentFilters;
                return argumentFilters != null && argumentFilters.All(x => x != null);
            }
            catch (Exception)
            {
            }

            argumentFilters = null;
            return false;
        }