Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 public void VisitThis(JThis node)
 {
     Write("this");
 }