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"); }
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"); }
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"); }