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