예제 #1
0
        public override bool Execute()
        {
            ResharperLogger.Debug("Initialize called on " + ProjectFilePath);
            EnsureWrapRepositoryIsInitialized();

            if (!EnableVisualStudioIntegration)
            {
                return(true);
            }
            ResharperHook.TryRegisterResharper(Environment, WrapDescriptorPath, PackageRepository);
            SolutionAddIn.Initialize();
            if (_commands == null)
            {
                lock (this)
                    if (_commands == null)
                    {
                        var repository = new CommandRepository(ReadCommands(Services.ServiceLocator.GetService <IEnvironment>()));
                        _commands = new UICommands(repository);
                        _commands.Initialize();
                    }
            }
            return(true);
        }
        public override bool Execute()
        {
            ResharperLogger.Debug("Initialize called on " + ProjectFilePath);
            EnsureWrapRepositoryIsInitialized();

            if (!EnableVisualStudioIntegration) return true;
            ResharperHook.TryRegisterResharper(Environment, WrapDescriptorPath, PackageRepository);
            SolutionAddIn.Initialize();
            if (_commands == null)
            {
                lock (this)
                    if (_commands == null)
                    {
                        var repository = new CommandRepository(ReadCommands(Services.ServiceLocator.GetService<IEnvironment>()));
                        _commands = new UICommands(repository);
                        _commands.Initialize();
                    }
            }
            return true;
        }