Exemple #1
0
        public virtual IType MapCallableType(AnonymousCallableType sourceType)
        {
            CallableSignature signature = sourceType.GetSignature();

            IType returnType = MapType(signature.ReturnType);

            IParameter[] parameters = MapParameters(signature.Parameters);

            CallableSignature mappedSignature = new CallableSignature(
                parameters, returnType, signature.AcceptVarArgs);

            return(TypeSystemServices.GetCallableType(mappedSignature));
        }
Exemple #2
0
        Method CreateInvokeMethod(AnonymousCallableType anonymousType)
        {
            CallableSignature signature = anonymousType.GetSignature();

            return(CodeBuilder.CreateRuntimeMethod("Invoke", signature.ReturnType, signature.Parameters, signature.AcceptVarArgs));
        }