Ejemplo n.º 1
0
        public void OnLoad(ISsmsExtendedFunctionalityProvider provider)
        {
            AssemblyLoadHandler.Initialize();
            LogConfigurator.InitializeForHost();

            var ssmsProvider           = (ISsmsFunctionalityProvider6)provider;
            var ssmsQueryWindowManager = ssmsProvider.GetQueryWindowManager();

            m_CheckForUpdatesService = GetBestCheckForUpdateService();

            ObjectFactory.Bind <ISsmsFunctionalityProvider6>().ToConstant(ssmsProvider);
            ObjectFactory.Bind <ISsmsQueryWindowManager>().ToConstant(ssmsQueryWindowManager);
            ObjectFactory.Bind <Dispatcher>().ToConstant(Dispatcher.CurrentDispatcher).InSingletonScope();

            AddObjectExplorerMenuItems(ssmsProvider);
            AddQueryWindowContextItems(ssmsQueryWindowManager);
            AddToolbarItems(ssmsProvider);
            AddToolsMenuItems(ssmsProvider);

            m_CheckForUpdatesService.OnStartup();

            s_Logger.Debug("Loaded");
        }