コード例 #1
0
    internal static CSharpSimplifierOptions GetCSharpSimplifierOptions(this AnalyzerOptions options, SyntaxTree syntaxTree)
    {
        var configOptions = options.AnalyzerConfigOptionsProvider.GetOptions(syntaxTree);
        var ideOptions    = options.GetIdeOptions();

        return(CSharpSimplifierOptions.Create(configOptions, (CSharpSimplifierOptions?)ideOptions.SimplifierOptions));
    }
コード例 #2
0
    internal static CSharpSimplifierOptions GetCSharpSimplifierOptions(this AnalyzerOptions options, SyntaxTree syntaxTree)
    {
        var configOptions = options.AnalyzerConfigOptionsProvider.GetOptions(syntaxTree);
        var ideOptions    = options.GetIdeOptions();

#if CODE_STYLE
        var fallbackOptions = (CSharpSimplifierOptions?)null;
#else
        var fallbackOptions = (CSharpSimplifierOptions?)ideOptions.CleanupOptions?.SimplifierOptions;
#endif
        return(CSharpSimplifierOptions.Create(configOptions, fallbackOptions));
    }
コード例 #3
0
 public AnalyzerOptionsProvider(AnalyzerConfigOptions options, AnalyzerOptions fallbackOptions)
     : this(options, fallbackOptions.GetIdeOptions())
 {
 }