Пример #1
0
        public object GetFirstParameterValue <T>(T source, Expression <Action> expression)
        {
            var invocationCall = expression.Body as InvocationExpression;

            ExpressionAnalyzer analyzer = new ExpressionAnalyzer();

            bool dontIgnore = analyzer.TryProcessParameter(source, invocationCall.Arguments.First(), checkForParameterDoNotCache: true, parameterValue: out object parameterValue);

            if (!dontIgnore)
            {
                Assert.Fail("Should not have been ignore");
            }

            return(parameterValue);
        }