/// <summary> /// This allows you to override the global container locally /// Useful for scenarios where you are replacing the global container /// but needs to do some initializing that relies on it. /// </summary> /// <param name="localContainer"></param> /// <returns></returns> public static IDisposable UseLocalContainer(IWindsorContainer localContainer) { LocalContainerStack.Push(localContainer); return(new DisposableAction(delegate { Reset(localContainer); })); }
public static IDisposable UseLocalContainer(IContainer localContainer) { LocalContainerStack.Push(localContainer); return(new DisposableAction(() => Reset(localContainer))); }