public object?CreateAsyncInitializerFunc(object[] parameters)
        {
            var factoryImplementation1 = GetFactoryImplementation();

            factoryImplementation1.SetRequest(request.CreateSubRequest(targetObjectType, parameters));
            var factoryImplementation = factoryImplementation1;

            return(asyncInitializerFactory.CreateFuncDelegate(factoryImplementation));
        }
Exemple #2
0
        public void CompileIntFactory()
        {
            var target = new ObjectTarget();
            var fact   = new ForwardFuncToMethodCall(typeof(Func <int, string>), nameof(ObjectTarget.SetDestination),
                                                     typeof(ObjectTarget));

            var f = (Func <int, string>)fact.CreateFuncDelegate(target);

            Assert.Equal("Return Value:101", f(101));
        }
 public object?Create(IBindingRequest bindingRequest) =>
 forwardFuncToMethodCall.CreateFuncDelegate(new FunctionFactoryImplementation(bindingRequest, resultType));
 protected virtual object CreateOutputObject(AsyncFunctionFactoryStub stub) =>
 staticCreatorFactory.CreateFuncDelegate(stub);