From the [Autofac documentation](http://autofac.readthedocs.org/en/latest/resolve/relationships.html?highlight=ienumerable#enumeration-ienumerable-b-ilist-b-icollection-b) I can see how to get all registrations for a class T:

```
public T[] ResolveAll<T>()
{
  return _container.Resolve<IEnumerable<T>>().ToArray();
}

```

But when I only have the Type available, how can I get the equivalent results?

```
public Array ResolveAll(Type service)
{
  return _container.Resolve( ??? 
}

```

I am trying to implement a wrapper class which has a pre-defined interface.

---

EDIT

For quick reference, the answer from Matthew Watson (with relevant ideas from David L) is:

```
public Array ResolveAll(Type service)
{
    var typeToResolve = typeof(IEnumerable<>).MakeGenericType(service);
    return _container.Resolve(typeToResolve) as Array;    
}

```