Example #1
0
            public object Construct(ConstruktionContext context, ConstruktionPipeline pipeline)
            {
                var inject = new Foo();

                pipeline.Inject(context.RequestType, inject);

                return(inject);
            }
Example #2
0
        public object Construct(ConstruktionContext context, ConstruktionPipeline pipeline)
        {
            var method = typeof(A)
                         .GetMethod("Fake", Type.EmptyTypes)
                         .MakeGenericMethod(context.ParameterInfo.ParameterType);

            var fake = method.Invoke(null, null);

            pipeline.Inject(context.RequestType, fake);

            return(fake);
        }