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