22 references to TargetScope
Microsoft.CodeAnalysis.Features (22)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
80
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);
29
foreach (
var
targetScope in Enum.GetValues<
TargetScope
>())
31
if (targetScope ==
TargetScope
.None)
70
public static bool HasValidScope(ImmutableArray<(string name, IOperation value)> namedAttributeArguments, out
TargetScope
targetScope)
76
targetScope =
TargetScope
.Module;
80
targetScope =
TargetScope
.None;
89
TargetScope
targetScope,
100
if (targetScope ==
TargetScope
.Resource)
111
if (targetScope ==
TargetScope
.Module)
116
else if (targetScope ==
TargetScope
.NamespaceAndDescendants)
119
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: