public void InitializeRVT(UIControlledApplication uiapp) { if (uiapp == null) { throw new System.ArgumentNullException(nameof(uiapp)); } Initialize(); IClientInformation appclient = new ClientInformation_Model(Core.Enums.Products.REVIT, uiapp.GetYear()); IRevitClientInformation revitclient = new RevitClientInformation_Model(uiapp.GetYear(), uiapp.GetProduct()); Container.RegisterInstance(revitclient, new ContainerControlledLifetimeManager()); Container.RegisterType <IClientRVT, Client>(); Container.RegisterType <IMessageBoxService, MessageBox_Service>(); }