29 references to TargetScope
Microsoft.CodeAnalysis (29)
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (22)
20
private static readonly SmallDictionary<string,
TargetScope
> s_suppressMessageScopeTypes = new SmallDictionary<string,
TargetScope
>(StringComparer.OrdinalIgnoreCase)
22
{ string.Empty,
TargetScope
.None },
23
{ "module",
TargetScope
.Module },
24
{ "namespace",
TargetScope
.Namespace },
25
{ "resource",
TargetScope
.Resource },
26
{ "type",
TargetScope
.Type },
27
{ "member",
TargetScope
.Member },
28
{ "namespaceanddescendants",
TargetScope
.NamespaceAndDescendants }
31
private static bool TryGetTargetScope(SuppressMessageInfo info, out
TargetScope
scope)
85
if (TryGetTargetScope(info, out
TargetScope
targetScope))
89
case
TargetScope
.Namespace:
94
case
TargetScope
.NamespaceAndDescendants:
329
if (TryGetTargetScope(info, out
TargetScope
scope))
331
if ((scope ==
TargetScope
.Module || scope ==
TargetScope
.None) && info.Target == null)
357
internal static ImmutableArray<ISymbol> ResolveTargetSymbols(Compilation compilation, string target,
TargetScope
scope)
361
case
TargetScope
.Namespace:
362
case
TargetScope
.Type:
363
case
TargetScope
.Member:
366
case
TargetScope
.NamespaceAndDescendants:
367
return ResolveTargetSymbols(compilation, target,
TargetScope
.Namespace);
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: