MethodInvocationExpression CreateYieldInvocation(Expression value, int newState)
{
MethodInvocationExpression invocation = CodeBuilder.CreateMethodInvocation(
CodeBuilder.CreateSelfReference(_enumerator.Entity),
_yield,
CodeBuilder.CreateIntegerLiteral(newState),
value == null ? GetDefaultYieldValue() : value);
if (null != value) invocation.LexicalInfo = value.LexicalInfo;
return invocation;
}