Пример #1
0
        public CodeAnalyzer(
            AnalyzerLoader analyzerLoader,
            IFormatProvider formatProvider = null,
            CodeAnalyzerOptions options    = null)
        {
            _analyzerLoader = analyzerLoader;

            FormatProvider = formatProvider;
            Options        = options ?? CodeAnalyzerOptions.Default;
        }
Пример #2
0
        public CodeAnalyzer(
            IEnumerable <AnalyzerAssembly> analyzerAssemblies = null,
            IFormatProvider formatProvider = null,
            CodeAnalyzerOptions options    = null)
        {
            if (analyzerAssemblies != null)
            {
                _analyzerAssemblies.AddRange(analyzerAssemblies);
            }

            Options        = options ?? CodeAnalyzerOptions.Default;
            FormatProvider = formatProvider;
        }
Пример #3
0
        public CodeAnalyzer(
            AbstractSyntaxFactsServiceFactory syntaxFactsFactory,
            IEnumerable <string> analyzerAssemblies = null,
            IFormatProvider formatProvider          = null,
            CodeAnalyzerOptions options             = null)
        {
            SyntaxFactsFactory = syntaxFactsFactory;

            Options = options ?? CodeAnalyzerOptions.Default;

            if (analyzerAssemblies != null)
            {
                _analyzerAssemblies.LoadFrom(analyzerAssemblies, loadFixers: false);
            }

            FormatProvider = formatProvider;
        }