static public void EmitAsDelegate(TypeEmitter declaringType, TypeReference delegateType, MethodReference targetMethod)
        {
            var definition = new FunctorMethodEmitter(declaringType, "AsDelegate", delegateType,
                                                      MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig);

            definition.EmitAsDelegate(delegateType, targetMethod);
        }