22 references to TargetScope
Microsoft.CodeAnalysis.CodeStyle (22)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
81
if (!SuppressMessageAttributeState.HasValidScope(namedAttributeArguments, out
var
targetScope))
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (14)
20
private static readonly ImmutableDictionary<string,
TargetScope
> s_targetScopesMap = CreateTargetScopesMap();
25
private static ImmutableDictionary<string,
TargetScope
> CreateTargetScopesMap()
27
var builder = ImmutableDictionary.CreateBuilder<string,
TargetScope
>(StringComparer.OrdinalIgnoreCase);
30
foreach (
TargetScope
targetScope in Enum.GetValues(typeof(
TargetScope
)))
33
if (targetScope ==
TargetScope
.None)
72
public static bool HasValidScope(ImmutableArray<(string name, IOperation value)> namedAttributeArguments, out
TargetScope
targetScope)
78
targetScope =
TargetScope
.Module;
82
targetScope =
TargetScope
.None;
91
TargetScope
targetScope,
102
if (targetScope ==
TargetScope
.Resource)
113
if (targetScope ==
TargetScope
.Module)
118
else if (targetScope ==
TargetScope
.NamespaceAndDescendants)
121
targetScope =
TargetScope
.Namespace;
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (7)
38
private readonly
TargetScope
_scope;
42
public TargetSymbolResolver(Compilation compilation,
TargetScope
scope, string fullyQualifiedName)
129
if (_scope !=
TargetScope
.Namespace && PeekNextChar() == '`')
181
if (_scope ==
TargetScope
.Member && !isIndexerProperty && parameters != null)
202
case
TargetScope
.Namespace:
206
case
TargetScope
.Type:
210
case
TargetScope
.Member: