Пример #1
0
 public static DisposeAnalysisKind GetDisposeAnalysisKindOption(
     this AnalyzerOptions options,
     DiagnosticDescriptor rule,
     ISymbol symbol,
     Compilation compilation,
     DisposeAnalysisKind defaultValue,
     CancellationToken cancellationToken)
 => options.GetDisposeAnalysisKindOption(rule, symbol.Locations[0].SourceTree, compilation, defaultValue, cancellationToken);
Пример #2
0
 public static DisposeAnalysisKind GetDisposeAnalysisKindOption(
     this AnalyzerOptions options,
     DiagnosticDescriptor rule,
     ISymbol symbol,
     Compilation compilation,
     DisposeAnalysisKind defaultValue)
 => TryGetSyntaxTreeForOption(symbol, out var tree)
     ? options.GetDisposeAnalysisKindOption(rule, tree, compilation, defaultValue)
     : defaultValue;