JNode CreateJsDelegateIfNeeded(JFunction func, IMember currentMember, IType delType, bool isAnonymous) { if (currentMember != null && !currentMember.IsStatic && !UseNativeFunctions(delType) && !JMeta.ForceDelegatesAsNativeFunctions(currentMember)) { var instanceContext = new JThis(); JExpression wrapper; if (isAnonymous) { wrapper = CreateAnonymousJsDelegate(instanceContext, func); } else { wrapper = CreateJsDelegate(instanceContext, func); } return(wrapper); } else { return(func); } }
public void VisitThis(JThis node) { Write("this"); }