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