Esempio n. 1
0
        internal static CSharpInheritanceTagger CreateInstance(CSharpInheritanceTaggerProvider provider, ITextBuffer buffer)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            if (buffer == null)
            {
                throw new ArgumentNullException("buffer");
            }

            return(buffer.Properties.GetOrCreateSingletonProperty(() => new CSharpInheritanceTagger(provider, buffer)));
        }
Esempio n. 2
0
        public CSharpInheritanceTagger(CSharpInheritanceTaggerProvider provider, ITextBuffer buffer)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            if (buffer == null)
            {
                throw new ArgumentNullException("buffer");
            }

            this._provider = provider;
            this._buffer   = buffer;

            if (_analyzerType == null)
            {
                _analyzerType = LoadAnalyzerType(provider.GlobalServiceProvider);
            }

            this._analyzer = (IInheritanceParser)Activator.CreateInstance(_analyzerType, buffer, provider.TaskScheduler, provider.TextDocumentFactoryService, provider.OutputWindowService, provider.GlobalServiceProvider, new InheritanceTagFactory());
            this._analyzer.ParseComplete += HandleParseComplete;
            this._analyzer.RequestParse(false);
        }