If I understand correctly, you have something like
public class MyThing : IFoo, IBar { }
And you want the following to return the same instance:
Resolve<IFoo>(); Resolve<IBar>();
If yes, maybe, but it's a little ugly:
container.Register<IFoo, MyThing>(); container.Register<IBar>((c,p) => c.Resolve<IFoo>() as IBar);
Perhaps you could wrap this in some prettier syntax if you want, but the factory delegate is what will happen under the hood.
Steven robbins
source share