コード例 #1
0
ファイル: RoslynPackage.cs プロジェクト: daking2014/roslyn
        private void LoadAnalyzerNodeComponents()
        {
            this.ComponentModel.GetService<IAnalyzerNodeSetup>().Initialize(this);

            _ruleSetEventHandler = this.ComponentModel.GetService<RuleSetEventHandler>();
            if (_ruleSetEventHandler != null)
            {
                _ruleSetEventHandler.Register();
            }
        }
コード例 #2
0
        private void LoadAnalyzerNodeComponents()
        {
            _analyzerTracker = this.ComponentModel.GetService<AnalyzerItemsTracker>();
            if (_analyzerTracker != null)
            {
                _analyzerTracker.Register();
            }

            var analyzerCommandHandler = this.ComponentModel.GetService<AnalyzersCommandHandler>();
            if (analyzerCommandHandler != null)
            {
                analyzerCommandHandler.Initialize((IMenuCommandService)this.GetService(typeof(IMenuCommandService)));
            }

            _ruleSetEventHandler = this.ComponentModel.GetService<RuleSetEventHandler>();
            if (_ruleSetEventHandler != null)
            {
                _ruleSetEventHandler.Register();
            }
        }