예제 #1
0
        public void PassOutParameterToMethod()
        {
            var lamdaExpression = Helper.GetLamdaExpression("RefOutTestClass", "PassRefParameterToMethod");

            var del = lamdaExpression.Compile();

            var instance = new ExpressionTestClass();

            del.DynamicInvoke(instance);

            Tracker.LastValue.Should().Be("hello");
        }
예제 #2
0
        public void AssignExpression()
        {
            var lamdaExpression = Helper.GetLamdaExpression("ExpressionTestClass", "AssignExpression");

            var del = lamdaExpression.Compile();

            var instance = new ExpressionTestClass();

            del.DynamicInvoke(instance);

            Tracker.LastValue.Should().Be("hello");
        }
예제 #3
0
        public void DefineOutMethod()
        {
            var lamdaExpression = Helper.GetLamdaExpression("RefOutTestClass", "DefineOutMethod");

            var del = lamdaExpression.Compile();

            var instance = new ExpressionTestClass();

            string value = "";

            throw new NotImplementedException();

            //del.DynamicInvoke(instance, out value);

            value.Should().Be("value");
        }