/// <summary> /// Register a type to the Parent container, will rebuild the container. /// </summary> /// <typeparam name="TImp">The type to register.</typeparam> /// <typeparam name="TInt">The interface to resolve the type with.</typeparam> /// <typeparam name="TRoot">The root view type.</typeparam> /// <remarks>Note from AutoFac on ContainerBuilder.Update being marked obsolete: /// Containers should generally be considered immutable. Register all of your dependencies before building/resolving. /// If you need to change the contents of a container, you technically should rebuild the container. /// As of my current running ver. of AutoFac 6.0.0 this method has been removed. /// </remarks> public static void RegisterType <TRoot, TImp, TInt>(IContainerBuilderFacade builder) { ConfigureContainer <TRoot>(builder.RegisterType <TInt, TImp>().Build().GetCachedBuilder()); }
public RootViewModel(IContainerBuilderFacade builder) { _builder = builder; }