DotNetWebToolkit.Cil2Js.Output.VisitorJsResolveDelegates.VisitCall C# (CSharp) Method

VisitCall() protected method

protected VisitCall ( ExprCall e ) : ICode
e DotNetWebToolkit.Cil2Js.Ast.ExprCall
return ICode
        protected override ICode VisitCall(ExprCall e) {
            var isDelegate = e.CallMethod.DeclaringType.EnumThisAllBaseTypes().Any(x => x.IsDelegate());
            if (isDelegate) {
                var ctx = e.Ctx;
                switch (e.CallMethod.Name) {
                case "Invoke":
                    return new ExprJsDelegateInvoke(ctx, e.Obj, e.Args);
                default:
                    throw new NotSupportedException("Cannot handle delegate call: " + e.CallMethod.Name);
                }
            } else {
                return base.VisitCall(e);
            }
        }
VisitorJsResolveDelegates