Esempio n. 1
0
        public void Initialize()
        {
            var boot = new Bootstrapper();

            boot.Run();

            if (boot.Container == null)
            {
                return;
            }

            Container = boot.Container;

            IApplicationAuthor author = new ApplicationAuthor_Model("Ben de Vries", "*****@*****.**");

            Container.RegisterInstance(author);

#if ACAD
            IClientInformation appclient = new ClientInformation_Model(Application_Helpers.Product(), Application_Helpers.Year());

            IAutoCADClientInformation acadclient = new AutoCADClientInformation_Model(appclient, Application_Helpers.Version());
            Container.RegisterInstance(acadclient, new ContainerControlledLifetimeManager());

            Container.RegisterType <IClient, Client>();
            Container.RegisterType <IMessageBoxService, MessageBox_Service>();
#elif NAVIS
            IClientInformation appclient = new ClientInformation_Model(Core.Enums.Products.NAVIS, Application_Helpers.Year());

            INavisworksClientInformation acadclient = new NavisworksClientInformation_Model(Application_Helpers.Year(), Application_Helpers.Version());
            Container.RegisterInstance(acadclient, new ContainerControlledLifetimeManager());

            Container.RegisterType <IClient, Client>();
            Container.RegisterType <IMessageBoxService, MessageBox_Service>();
#endif
        }
Esempio n. 2
0
        public void Initialize()
        {
            var boot = new Bootstrapper();

            boot.Run();

            if (boot.Container == null)
            {
                return;
            }

            Container = boot.Container;

            IApplicationAuthor author = new ApplicationAuthor_Model("Marco Tecedor", "*****@*****.**");

            Container.RegisterInstance(author);