// Method call with ref argument public void MethodCallWithRefArgument() { Expression <Func <ActivityContext, int> > expression = (env) => DummyHelper.MethodCallWithRefArgument(ref DummyHelper.StaticIntField); string methodName = "MethodCallWithRefArgument"; TestExpression expr = new TestExpression() { ResultType = typeof(int), ExpectedNode = new InvokeMethod <int>() { MethodName = methodName, TargetType = typeof(DummyHelper), Parameters = { new InOutArgument <int>() { Expression = new FieldReference <DummyHelper, int> { FieldName = "StaticIntField" }, EvaluationOrder = 1 } } }, ExpressionTree = expression }; ExpressionTestRuntime.ValidateExpressionXaml <int>(expr); ExpressionTestRuntime.ValidateExecutionResult(expr, null); }
// TryConvert method call with ref argument public void TryConvertMethodCallWithRefArgument() { int i = 100; ExpressionTestRuntime.TryConvert((env) => DummyHelper.MethodCallWithRefArgument(ref i), true); }