89 references to QuickAttributes
Microsoft.CodeAnalysis.CSharp (73)
Declarations\DeclarationTreeBuilder.cs (18)
30private QuickAttributes _nonGlobalAliasedQuickAttributes; 154quickAttributes: QuickAttributes.None); 173quickAttributes: QuickAttributes.None); 260quickAttributes: QuickAttributes.None); 277private static QuickAttributes GetQuickAttributes( 280var result = QuickAttributes.None; 320private static QuickAttributes GetNonGlobalAliasedQuickAttributes(CompilationUnitSyntax compilationUnit) 322var result = GetQuickAttributes(compilationUnit.Usings, global: false); 334private static QuickAttributes GetNonGlobalAliasedQuickAttributes(BaseNamespaceDeclarationSyntax @namespace) 336var result = GetQuickAttributes(@namespace.Usings, global: false); 374var globalAliasedQuickAttributes = GetQuickAttributes(compilationUnit.Usings, global: true); 657var quickAttributes = GetQuickAttributes(node.AttributeLists); 721var quickAttributes = DeclarationTreeBuilder.GetQuickAttributes(node.AttributeLists); 754var quickAttributes = DeclarationTreeBuilder.GetQuickAttributes(node.AttributeLists); 775private static QuickAttributes GetQuickAttributes(SyntaxList<AttributeListSyntax> attributeLists) 777var result = QuickAttributes.None;
Declarations\MergedTypeDeclaration.cs (1)
55public ImmutableArray<SyntaxList<AttributeListSyntax>> GetAttributeDeclarations(QuickAttributes? quickAttributes)
Declarations\RootSingleNamespaceDeclaration.cs (2)
25public QuickAttributes GlobalAliasedQuickAttributes { get; } 36QuickAttributes globalAliasedQuickAttributes)
Declarations\SingleTypeDeclaration.cs (2)
31public QuickAttributes QuickAttributes { get; } 74QuickAttributes quickAttributes)
Symbols\Source\QuickAttributeChecker.cs (26)
26private readonly Dictionary<string, QuickAttributes> _nameToAttributeMap; 49result.AddName(AttributeDescription.TypeIdentifierAttribute.Name, QuickAttributes.TypeIdentifier); 50result.AddName(AttributeDescription.TypeForwardedToAttribute.Name, QuickAttributes.TypeForwardedTo); 51result.AddName(AttributeDescription.AssemblyKeyNameAttribute.Name, QuickAttributes.AssemblyKeyName); 52result.AddName(AttributeDescription.AssemblyKeyFileAttribute.Name, QuickAttributes.AssemblyKeyFile); 53result.AddName(AttributeDescription.AssemblySignatureKeyAttribute.Name, QuickAttributes.AssemblySignatureKey); 63_nameToAttributeMap = new Dictionary<string, QuickAttributes>(StringComparer.Ordinal); 69_nameToAttributeMap = new Dictionary<string, QuickAttributes>(previous._nameToAttributeMap, StringComparer.Ordinal); 73private void AddName(string name, QuickAttributes newAttributes) 78var currentValue = QuickAttributes.None; 81QuickAttributes newValue = newAttributes | currentValue; 103if (_nameToAttributeMap.TryGetValue(target, out var foundAttributes)) 122public bool IsPossibleMatch(AttributeSyntax attr, QuickAttributes pattern) 128QuickAttributes foundAttributes; 156/// Returns the <see cref="QuickAttributes"/> that corresponds to the particular type 160public static QuickAttributes GetQuickAttributes(string name, bool inAttribute) 163Debug.Assert(QuickAttributes.Last == QuickAttributes.AssemblySignatureKey); 165var result = QuickAttributes.None; 168result |= QuickAttributes.TypeIdentifier; 172result |= QuickAttributes.TypeForwardedTo; 176result |= QuickAttributes.AssemblyKeyName; 180result |= QuickAttributes.AssemblyKeyFile; 184result |= QuickAttributes.AssemblySignatureKey;
Symbols\Source\SourceAssemblySymbol.cs (21)
212private string? GetWellKnownAttributeDataStringField(Func<CommonAssemblyWellKnownAttributeData, string> fieldGetter, string? missingValue = null, QuickAttributes? attributeMatchesOpt = null) 348WellKnownAttributeData.StringMissingValue, QuickAttributes.AssemblyKeyName); 358WellKnownAttributeData.StringMissingValue, QuickAttributes.AssemblyKeyFile); 376missingValue: null, QuickAttributes.AssemblySignatureKey); 1449private CommonAssemblyWellKnownAttributeData GetLimitedNetModuleDecodedWellKnownAttributeData(QuickAttributes attributeMatches) 1451Debug.Assert(attributeMatches is QuickAttributes.AssemblyKeyFile 1452or QuickAttributes.AssemblyKeyName 1453or QuickAttributes.AssemblySignatureKey); 1475ImmutableArray<string> netModuleNames, QuickAttributes attributeMatches) 1502void limitedDecodeWellKnownAttribute(CSharpAttributeData attribute, QuickAttributes attributeMatches, ref CommonAssemblyWellKnownAttributeData result) 1504if (attributeMatches is QuickAttributes.AssemblySignatureKey && 1510else if (attributeMatches is QuickAttributes.AssemblyKeyFile && 1516else if (attributeMatches is QuickAttributes.AssemblyKeyName && 1651private CommonAssemblyWellKnownAttributeData? GetSourceDecodedWellKnownAttributeData(QuickAttributes attribute) 1662QuickAttributes.AssemblySignatureKey => isPossibleAssemblySignatureKeyAttribute, 1663QuickAttributes.AssemblyKeyName => isPossibleAssemblyKeyNameAttribute, 1664QuickAttributes.AssemblyKeyFile => isPossibleAssemblyKeyFileAttribute, 1675return checker.IsPossibleMatch(node, QuickAttributes.AssemblySignatureKey); 1681return checker.IsPossibleMatch(node, QuickAttributes.AssemblyKeyName); 1687return checker.IsPossibleMatch(node, QuickAttributes.AssemblyKeyFile); 1755if (checker.IsPossibleMatch(node, QuickAttributes.TypeForwardedTo))
Symbols\Source\SourceNamedTypeSymbol.cs (3)
779internal ImmutableArray<SyntaxList<AttributeListSyntax>> GetAttributeDeclarations(QuickAttributes? quickAttributes = null) 1187ImmutableArray<SyntaxList<AttributeListSyntax>> attributeLists = GetAttributeDeclarations(QuickAttributes.TypeIdentifier); 1198if (checker.IsPossibleMatch(attr, QuickAttributes.TypeIdentifier))
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (16)
Attributes\AttributeTests.cs (16)
56Assert.True(predefined.IsPossibleMatch(typeForwardedTo, QuickAttributes.TypeForwardedTo)); 57Assert.False(predefined.IsPossibleMatch(typeForwardedTo, QuickAttributes.TypeIdentifier)); 58Assert.False(predefined.IsPossibleMatch(typeForwardedTo, QuickAttributes.None)); 60Assert.False(predefined.IsPossibleMatch(typeIdentifier, QuickAttributes.TypeForwardedTo)); 61Assert.True(predefined.IsPossibleMatch(typeIdentifier, QuickAttributes.TypeIdentifier)); 62Assert.False(predefined.IsPossibleMatch(typeIdentifier, QuickAttributes.None)); 66Assert.True(checker1.IsPossibleMatch(alias1, QuickAttributes.TypeForwardedTo)); 67Assert.False(checker1.IsPossibleMatch(alias1, QuickAttributes.TypeIdentifier)); 70Assert.True(checker1a.IsPossibleMatch(alias1, QuickAttributes.TypeForwardedTo)); 71Assert.True(checker1a.IsPossibleMatch(alias1, QuickAttributes.TypeIdentifier)); 75Assert.True(checker1b.IsPossibleMatch(alias1, QuickAttributes.TypeForwardedTo)); 76Assert.False(checker1b.IsPossibleMatch(alias1, QuickAttributes.TypeIdentifier)); 77Assert.False(checker1b.IsPossibleMatch(alias2, QuickAttributes.TypeForwardedTo)); 78Assert.True(checker1b.IsPossibleMatch(alias2, QuickAttributes.TypeIdentifier)); 82Assert.True(checker3.IsPossibleMatch(alias3, QuickAttributes.TypeForwardedTo)); 83Assert.True(checker3.IsPossibleMatch(alias3, QuickAttributes.TypeIdentifier));