Is it possible to register an open generic delegate in autofac?
问题 I want to register a generic delegate that resolves itself at runtime, but I cannot find a way to do this on generics. Given a delegate that looks like this: public delegate TOutput Pipe<in TInput, out TOutput>(TInput input); And given a discretely registered delegate that look like this: public class AnonymousPipe<TInput, TOutput> { public Pipe<TInput, TOutput> GetPipe(IContext context) {...} I want to register a function along the lines of this: builder.RegisterGeneric(typeof(Pipe<,>)).As