I'm new to Unity and I'm having a hard time trying to figure out how to expand Unity's concept of Auto Factory. Unity provides out of box the ability to create factories using Func in the place of the parameter itself. Like that:

```
public class Foo
{
    private readonly Func<IBar> _barFactory;

    public Foo(Func<IBar> barFactory)
    {
        _bar = barFactory;
    }
}

```

The thing is, there are places where the class created by the factory needs some parameters and I'll only know those parameters in run time. Other than that, the number and type of those parameters varies from class to class.

What I'm looking for is something similar to [Autofac DelegateFacotry](http://code.google.com/p/autofac/wiki/DelegateFactories), but I would like to keep the Unity's feeling. So, I want to make Unity to work like that:

```
public class Foo
{
    private readonly Func<int, string, IBar> _barFactory;

    public Foo(Func<int, string, IBar> barFactory)
    {
        _bar = barFactory;
    }
}

```

The above code does not work, because Unity does work with that constructor, but it is exactly what I'm looking for.

I have tried use BuilderStrategy but it boils down to either Expression or IL generation. Before going down that path I would like to check for other options.

Is any one experienced enough with Unity who can help me with that?

Here are the constrains I have:

1. Keep Unity's concept of using Func
2. Do not need to register every single Func within the container
3. The constructor should accept Func from Func to Func (Func is handled already)
4. Changing the container is not an option

I hope I was clear enough. If I was not, please let me know.

**Edit 1**: I understand I can use abstract factories directly. But, the first goal is to keep Unity's feeling.