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)); }
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)); }
public AnalyzerOptionsProvider(AnalyzerConfigOptions options, AnalyzerOptions fallbackOptions) : this(options, fallbackOptions.GetIdeOptions()) { }