Unity will inject it self into constructor or property with IUnityContainer interface. No need to implement any "ApplicationContextAware"
public class Something
{
//use this
public Something(IUnityContainer container)
{
Container = container;
}
//or this
public IUnityContainer Container { get; set; }
}
No comments:
Post a Comment