Here\'s my problem: I have a container where I register concrete types as interfaces.
builder.RegisterType().As
If you are using the RegisterType to register your services this is possible. I wrote a quick test that should help you extract the data you need.
private interface IDeleteOrganization
{
}
private class DeleteOrganization : IDeleteOrganization
{
}
[TestMethod]
public void CanResolveConcreteType()
{
var builder = new ContainerBuilder();
builder.RegisterType()
.As();
using(var container = builder.Build())
{
var registration = container.ComponentRegistry
.RegistrationsFor(new TypedService(typeof (IDeleteOrganization)))
.SingleOrDefault();
if (registration != null)
{
var activator = registration.Activator as ReflectionActivator;
if (activator != null)
{
//we can get the type
var type = activator.LimitType;
Assert.AreEqual(type, typeof (DeleteOrganization));
}
}
}
}