4 types derived from CSharpAttributeData
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Attributes\PEAttributeData.cs (1)
18internal sealed class PEAttributeData : CSharpAttributeData
Symbols\Attributes\RetargetingAttributeData.cs (1)
15internal sealed class RetargetingAttributeData : CSharpAttributeData
Symbols\Attributes\SourceAttributeData.cs (1)
18internal sealed class SourceAttributeData : CSharpAttributeData
Symbols\Source\SynthesizedAttributeData.cs (1)
15internal abstract class SynthesizedAttributeData : CSharpAttributeData
530 references to CSharpAttributeData
Microsoft.CodeAnalysis.CSharp (530)
Binder\Binder_Attributes.cs (3)
75CSharpAttributeData?[] attributeDataArray, 126internal (CSharpAttributeData, BoundAttribute) GetAttribute( 284private CSharpAttributeData GetAttribute(BoundAttribute boundAttribute, BindingDiagnosticBag diagnostics)
Binder\EarlyWellKnownAttributeBinder.cs (2)
26internal (CSharpAttributeData, BoundAttribute) GetAttribute( 42internal new (CSharpAttributeData, BoundAttribute) GetAttribute(
Compiler\ClsComplianceChecker.cs (8)
144foreach (CSharpAttributeData assemblyLevelAttribute in peModule.GetAssemblyAttributes()) 342foreach (CSharpAttributeData attribute in symbol.GetAttributes()) 599private void CheckForAttributeWithArrayArgumentInternal(ImmutableArray<CSharpAttributeData> attributes) 601foreach (CSharpAttributeData attribute in attributes) 655private bool TryGetAttributeWarningLocation(CSharpAttributeData attribute, out Location location) 766private bool TryGetClsComplianceAttributeLocation(ImmutableArray<CSharpAttributeData> attributes, out Location attributeLocation) 768foreach (CSharpAttributeData data in attributes) 1187foreach (CSharpAttributeData data in symbol.GetAttributes())
Emitter\Model\MethodSymbolAdapter.cs (2)
532ImmutableArray<CSharpAttributeData> userDefined = AdaptedMethodSymbol.GetReturnTypeAttributes(); 533ArrayBuilder<CSharpAttributeData> synthesized = null;
Emitter\Model\SourceAssemblySymbolAdapter.cs (3)
16internal IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder, bool emittingRefAssembly, bool emittingAssemblyAttributesInNetModule) 20ImmutableArray<CSharpAttributeData> userDefined = this.GetAttributes(); 21ArrayBuilder<CSharpAttributeData> synthesized = null;
Emitter\Model\SymbolAdapter.cs (13)
85internal virtual IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) 93internal IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder, bool emittingAssemblyAttributesInNetModule) 98ImmutableArray<CSharpAttributeData> userDefined; 99ArrayBuilder<CSharpAttributeData> synthesized = null; 112internal IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit( 113ImmutableArray<CSharpAttributeData> userDefined, 114ArrayBuilder<CSharpAttributeData> synthesized, 123return SpecializedCollections.EmptyEnumerable<CSharpAttributeData>(); 129private IEnumerable<CSharpAttributeData> GetCustomAttributesToEmitIterator( 130ImmutableArray<CSharpAttributeData> userDefined, 131ArrayBuilder<CSharpAttributeData> synthesized, 141foreach (var attribute in synthesized) 156CSharpAttributeData attribute = userDefined[i];
Emitter\NoPia\EmbeddedEvent.cs (2)
23protected override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) 73foreach (var attrData in underlyingContainingType.GetAttributes())
Emitter\NoPia\EmbeddedField.cs (1)
34protected override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Emitter\NoPia\EmbeddedMethod.cs (1)
35protected override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Emitter\NoPia\EmbeddedParameter.cs (1)
39protected override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Emitter\NoPia\EmbeddedProperty.cs (1)
25protected override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Emitter\NoPia\EmbeddedType.cs (2)
243protected override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) 248protected override CSharpAttributeData CreateTypeIdentifierAttribute(bool hasGuid, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
Emitter\NoPia\EmbeddedTypesManager.cs (6)
32EmbeddedTypesManager<PEModuleBuilder, ModuleCompilationState, EmbeddedTypesManager, SyntaxNode, CSharpAttributeData, 160internal override int GetTargetAttributeSignatureIndex(CSharpAttributeData attrData, AttributeDescription description) 165internal override CSharpAttributeData CreateSynthesizedAttribute(WellKnownMember constructor, ImmutableArray<TypedConstant> constructorArguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 197internal override CSharpAttributeData CreateSynthesizedAttribute(SpecialMember constructor, ImmutableArray<TypedConstant> constructorArguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 208internal override bool TryGetAttributeArguments(CSharpAttributeData attrData, out ImmutableArray<TypedConstant> constructorArguments, out ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 687protected override CSharpAttributeData CreateCompilerGeneratedAttribute()
Errors\MessageProvider.cs (3)
265diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), node.GetErrorDisplayName()); 282diagnostics.Add(ErrorCode.ERR_MarshalUnmanagedTypeNotValidForFields, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), unmanagedTypeName); 287diagnostics.Add(ErrorCode.ERR_MarshalUnmanagedTypeOnlyValidForFields, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), unmanagedTypeName);
FlowAnalysis\DefiniteAssignment.cs (1)
1871private void VisitAttributes(ImmutableArray<(CSharpAttributeData, BoundAttribute)> boundAttributes)
Lowering\ClosureConversion\LambdaCapturedVariable.cs (2)
187internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 193foreach (CSharpAttributeData attr in definition.GetAttributes())
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
31internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
28foreach (var attrData in @interface.GetAttributes())
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (2)
102internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 108foreach (CSharpAttributeData attr in definition.GetAttributes())
Lowering\StateMachineRewriter\StateMachineTypeSymbol.cs (7)
18private ImmutableArray<CSharpAttributeData> _attributes; 53public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 59ArrayBuilder<CSharpAttributeData> builder = null; 63foreach (var attribute in kickoffType.GetAttributes()) 70builder = ArrayBuilder<CSharpAttributeData>.GetInstance(2); // only 2 different attributes are inherited at the moment 78builder == null ? ImmutableArray<CSharpAttributeData>.Empty : builder.ToImmutableAndFree(), 79default(ImmutableArray<CSharpAttributeData>));
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (8)
63private ImmutableArray<CSharpAttributeData> _attributes; 70public override ImmutableArray<CSharpAttributeData> GetAttributes() 76ArrayBuilder<CSharpAttributeData> builder = null; 80foreach (var attribute in kickoffMethod.GetAttributes()) 89builder = ArrayBuilder<CSharpAttributeData>.GetInstance(4); // only 4 different attributes are inherited at the moment 97builder == null ? ImmutableArray<CSharpAttributeData>.Empty : builder.ToImmutableAndFree(), 98default(ImmutableArray<CSharpAttributeData>)); 121internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Lowering\SynthesizedMethodBaseSymbol.cs (4)
153public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 158: ImmutableArray<CSharpAttributeData>.Empty; 161public sealed override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() 164return InheritsBaseMethodAttributes ? BaseMethod.GetReturnTypeAttributes() : ImmutableArray<CSharpAttributeData>.Empty;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
251internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
148internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertyAccessorSymbol.cs (1)
86internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
168internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
164internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Attributes\AttributeData.cs (7)
213internal void DecodeSecurityAttribute<T>(Symbol targetSymbol, CSharpCompilation compilation, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 239internal static void DecodeSkipLocalsInitAttribute<T>(CSharpCompilation compilation, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 250internal static void DecodeMemberNotNullAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 286private static void ReportBadNotNullMemberIfNeeded(TypeSymbol type, DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, string memberName) 300internal static void DecodeMemberNotNullWhenAttribute<T>(TypeSymbol type, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 790internal static int IndexOfAttribute(this ImmutableArray<CSharpAttributeData> attributes, AttributeDescription description) 803internal static string? DecodeNotNullIfNotNullAttribute(this CSharpAttributeData attribute)
Symbols\Attributes\RetargetingAttributeData.cs (2)
17private readonly CSharpAttributeData _underlying; 24CSharpAttributeData underlying,
Symbols\Attributes\SourceAttributeData.cs (1)
114/// If the <see cref="CSharpAttributeData.ConstructorArguments"/> contains any named constructor arguments or default value arguments,
Symbols\EventSymbol.cs (2)
116public ImmutableArray<CSharpAttributeData> GetFieldAttributes() 119ImmutableArray<CSharpAttributeData>.Empty :
Symbols\Extensions\ReceiverParameterSymbol.cs (1)
43internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Extensions\RewrittenLambdaOrLocalFunctionSymbol.cs (1)
42internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Extensions\RewrittenMethodSymbol.cs (3)
90public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 95public sealed override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() 131internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Extensions\SourceExtensionImplementationMethodSymbol.cs (4)
66internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 71foreach (CSharpAttributeData attr in extensionProperty.GetAttributes()) 84internal override void AddSynthesizedReturnTypeAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 202internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Metadata\PE\PEAssemblySymbol.cs (4)
65private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 140public override ImmutableArray<CSharpAttributeData> GetAttributes() 149ImmutableArray<CSharpAttributeData> loadAndFilterAttributes() 158using var builder = TemporaryArray<CSharpAttributeData>.Empty;
Symbols\Metadata\PE\PEEventSymbol.cs (6)
34private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 363public override ImmutableArray<CSharpAttributeData> GetAttributes() 374ImmutableArray<CSharpAttributeData> attributes = loadAndFilterAttributes(containingPEModuleSymbol, out var hasRequiresUnsafeAttribute); 387ImmutableArray<CSharpAttributeData> loadAndFilterAttributes(PEModuleSymbol containingModule, out bool hasRequiresUnsafeAttribute) 396using var builder = TemporaryArray<CSharpAttributeData>.Empty; 412internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\Metadata\PE\PEFieldSymbol.cs (6)
142private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 602public override ImmutableArray<CSharpAttributeData> GetAttributes() 613ImmutableArray<CSharpAttributeData> loadAndFilterAttributes(out bool hasRequiredMemberAttribute, out bool hasRequiresUnsafeAttribute) 625using var builder = TemporaryArray<CSharpAttributeData>.Empty; 658internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) 660foreach (CSharpAttributeData attribute in GetAttributes())
Symbols\Metadata\PE\PEMethodSymbol.cs (11)
324public ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 367retVal._lazyCustomAttributes = ImmutableArray<CSharpAttributeData>.Empty; 1020public override ImmutableArray<CSharpAttributeData> GetAttributes() 1044return ImmutableArray<CSharpAttributeData>.Empty; 1050? InterlockedOperations.Initialize(ref uncommonFields._lazyCustomAttributes, ImmutableArray<CSharpAttributeData>.Empty) 1054ImmutableArray<CSharpAttributeData> loadAndFilterAttributes(out bool isExtensionMethod, out bool isReadOnly, out bool hasRequiresUnsafeAttribute) 1072using var builder = TemporaryArray<CSharpAttributeData>.Empty; 1109internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) => GetAttributes(); 1111public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() => Signature.ReturnParam.GetAttributes(); 1781internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 1786internal override void AddSynthesizedReturnTypeAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Metadata\PE\PEModuleSymbol.cs (13)
86private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 91private ImmutableArray<CSharpAttributeData> _lazyAssemblyAttributes; 252public override ImmutableArray<CSharpAttributeData> GetAttributes() 261internal ImmutableArray<CSharpAttributeData> GetAssemblyAttributes() 265ArrayBuilder<CSharpAttributeData> moduleAssemblyAttributesBuilder = null; 287moduleAssemblyAttributesBuilder = new ArrayBuilder<CSharpAttributeData>(); 300(moduleAssemblyAttributesBuilder != null) ? moduleAssemblyAttributesBuilder.ToImmutableAndFree() : ImmutableArray<CSharpAttributeData>.Empty, 301default(ImmutableArray<CSharpAttributeData>)); 306internal void LoadCustomAttributes(EntityHandle token, ref ImmutableArray<CSharpAttributeData> customAttributes) 329internal ImmutableArray<CSharpAttributeData> GetCustomAttributesForToken(EntityHandle token) 334return customAttributeHandles.SelectAsArray(static (handle, @this) => (CSharpAttributeData)new PEAttributeData(@this, handle), this); 556ImmutableArray<CSharpAttributeData> assemblyAttributes = GetAssemblyAttributes(); 569ImmutableArray<CSharpAttributeData> assemblyAttributes = GetAssemblyAttributes();
Symbols\Metadata\PE\PENamedTypeSymbol.cs (7)
139internal ImmutableArray<CSharpAttributeData> lazyCustomAttributes; 951public override ImmutableArray<CSharpAttributeData> GetAttributes() 956return ImmutableArray<CSharpAttributeData>.Empty; 961ImmutableArray<CSharpAttributeData> loadedCustomAttributes = loadAndFilterAttributes(out var hasRequiredMembers, out var isClosed); 980ImmutableArray<CSharpAttributeData> loadAndFilterAttributes(out bool hasRequiredMembers, out bool isClosed) 1003using var builder = TemporaryArray<CSharpAttributeData>.Empty; 1040internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\Metadata\PE\PEParameterSymbol.cs (12)
160private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 186private ImmutableArray<CSharpAttributeData> _lazyHiddenAttributes; 271_lazyCustomAttributes = ImmutableArray<CSharpAttributeData>.Empty; 272_lazyHiddenAttributes = ImmutableArray<CSharpAttributeData>.Empty; 1091public override ImmutableArray<CSharpAttributeData> GetAttributes() 1124ImmutableArray<CSharpAttributeData> loadAndFilterAttributes(out ImmutableArray<CSharpAttributeData> hiddenAttributes, out bool isParamArray, out bool isParamCollection) 1160using var builder = TemporaryArray<CSharpAttributeData>.Empty; 1205var hiddenBuilder = ArrayBuilder<CSharpAttributeData>.GetInstance(hiddenCount); 1229internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) 1231foreach (CSharpAttributeData attribute in GetAttributes()) 1237foreach (CSharpAttributeData attribute in _lazyHiddenAttributes)
Symbols\Metadata\PE\PEPropertySymbol.cs (8)
202public ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 390retVal._lazyCustomAttributes = ImmutableArray<CSharpAttributeData>.Empty; 792public override ImmutableArray<CSharpAttributeData> GetAttributes() 810return ImmutableArray<CSharpAttributeData>.Empty; 817result = ImmutableArray<CSharpAttributeData>.Empty; 824ImmutableArray<CSharpAttributeData> loadAndFilterAttributes(out bool hasRequiredMemberAttribute, out bool hasRequiresUnsafeAttribute) 838using var builder = TemporaryArray<CSharpAttributeData>.Empty; 866internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\Metadata\PE\PETypeParameterSymbol.cs (4)
45private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 640public override ImmutableArray<CSharpAttributeData> GetAttributes() 649ImmutableArray<CSharpAttributeData> loadAndFilterAttributes() 656using var builder = TemporaryArray<CSharpAttributeData>.Empty;
Symbols\MethodSymbol.cs (5)
402public virtual ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() 409return ImmutableArray<CSharpAttributeData>.Empty; 1168internal virtual void AddSynthesizedReturnTypeAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 1286protected static void AddRequiredMembersMarkerAttributes(ref ArrayBuilder<CSharpAttributeData> attributes, MethodSymbol methodToAttribute) 1309protected static void AddClosedClassesFeatureRequiredAttribute(ref ArrayBuilder<CSharpAttributeData> attributes, MethodSymbol methodToAttribute)
Symbols\NativeIntegerTypeSymbol.cs (2)
438internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 483internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\PublicModel\MethodSymbol.cs (1)
282return _underlying.GetReturnTypeAttributes().Cast<CSharpAttributeData, AttributeData>();
Symbols\ReducedExtensionMethodSymbol.cs (2)
460public override ImmutableArray<CSharpAttributeData> GetAttributes() 711internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Retargeting\RetargetingAssemblySymbol.cs (2)
91private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 225public override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\Retargeting\RetargetingEventSymbol.cs (2)
156public override ImmutableArray<CSharpAttributeData> GetAttributes() 161internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\Retargeting\RetargetingFieldSymbol.cs (3)
31private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 78public override ImmutableArray<CSharpAttributeData> GetAttributes() 83internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\Retargeting\RetargetingMethodSymbol.cs (6)
45private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 50private ImmutableArray<CSharpAttributeData> _lazyReturnTypeCustomAttributes; 215public override ImmutableArray<CSharpAttributeData> GetAttributes() 220internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) 226public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() 401internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Retargeting\RetargetingModuleSymbol.cs (2)
69private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 276public override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (3)
43private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 265public override ImmutableArray<CSharpAttributeData> GetAttributes() 270internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\Retargeting\RetargetingParameterSymbol.cs (4)
26private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 66public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 71internal sealed override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) 164internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Retargeting\RetargetingPropertySymbol.cs (3)
32private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 216public override ImmutableArray<CSharpAttributeData> GetAttributes() 221internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (13)
344foreach (var attrData in type.GetAttributes()) 1143private ImmutableArray<CSharpAttributeData> RetargetAttributes(ImmutableArray<CSharpAttributeData> oldAttributes) 1148internal IEnumerable<CSharpAttributeData> RetargetAttributes(IEnumerable<CSharpAttributeData> attributes) 1150foreach (var attributeData in attributes) 1156private CSharpAttributeData RetargetAttributeData(CSharpAttributeData oldAttributeData) 1302internal ImmutableArray<CSharpAttributeData> GetRetargetedAttributes( 1303ImmutableArray<CSharpAttributeData> underlyingAttributes, 1304ref ImmutableArray<CSharpAttributeData> lazyCustomAttributes) 1309ImmutableArray<CSharpAttributeData> retargetedAttributes = this.RetargetAttributes(underlyingAttributes); 1311ImmutableInterlocked.InterlockedCompareExchange(ref lazyCustomAttributes, retargetedAttributes, default(ImmutableArray<CSharpAttributeData>));
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (3)
38private ImmutableArray<CSharpAttributeData> _lazyCustomAttributes; 65public override ImmutableArray<CSharpAttributeData> GetAttributes() 119internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\ExtensionGroupingInfo.cs (5)
321static bool hasSameAttributes(ImmutableArray<CSharpAttributeData> attributes1, ImmutableArray<CSharpAttributeData> attributes2) 330var counts = new Dictionary<CSharpAttributeData, int>(comparer); 332foreach (var attribute in attributes1) 342foreach (var attribute in attributes2)
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (11)
22private CustomAttributesBag<CSharpAttributeData> _lazyCustomAttributesBag; 72public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 82private CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 118internal sealed override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 120CSharpAttributeData? attributeData; 163protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 168var attribute = arguments.Attribute; 204MarshalAsAttributeDecoder<FieldWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>.Decode(ref arguments, AttributeTargets.Field, MessageProvider.Instance); 265private void VerifyConstantValueMatches(ConstantValue attrValue, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 313internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData) 389internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\ImplicitNamedTypeSymbol.cs (2)
34public override ImmutableArray<CSharpAttributeData> GetAttributes() 37return ImmutableArray<CSharpAttributeData>.Empty;
Symbols\Source\SourceAssemblySymbol.cs (47)
66private CustomAttributesBag<CSharpAttributeData> _lazySourceAttributesBag; 71private CustomAttributesBag<CSharpAttributeData> _lazyNetModuleAttributesBag; 1146private bool IsKnownAssemblyAttribute(CSharpAttributeData attribute) 1189private HashSet<CSharpAttributeData> GetUniqueSourceAssemblyAttributes() 1191ImmutableArray<CSharpAttributeData> appliedSourceAttributes = this.GetSourceAttributesBag().Attributes; 1193HashSet<CSharpAttributeData> uniqueAttributes = null; 1197CSharpAttributeData attribute = appliedSourceAttributes[i]; 1210private static bool AddUniqueAssemblyAttribute(CSharpAttributeData attribute, ref HashSet<CSharpAttributeData> uniqueAttributes) 1216uniqueAttributes = new HashSet<CSharpAttributeData>(comparer: CommonAttributeDataComparer.Instance); 1222private bool ValidateAttributeUsageForNetModuleAttribute(CSharpAttributeData attribute, string netModuleName, BindingDiagnosticBag diagnostics, ref HashSet<CSharpAttributeData> uniqueAttributes) 1281private ImmutableArray<CSharpAttributeData> GetNetModuleAttributes(out ImmutableArray<string> netModuleNames) 1283ArrayBuilder<CSharpAttributeData> moduleAssemblyAttributesBuilder = null; 1290foreach (var attributeData in peModuleSymbol.GetAssemblyAttributes()) 1295moduleAssemblyAttributesBuilder = ArrayBuilder<CSharpAttributeData>.GetInstance(); 1306return ImmutableArray<CSharpAttributeData>.Empty; 1314ImmutableArray<CSharpAttributeData> attributesFromNetModules, 1326HashSet<CSharpAttributeData> uniqueAttributes = GetUniqueSourceAssemblyAttributes(); 1328var arguments = new DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation>(); 1340CSharpAttributeData attribute = attributesFromNetModules[i]; 1363private void LoadAndValidateNetModuleAttributes(ref CustomAttributesBag<CSharpAttributeData> lazyNetModuleAttributesBag) 1367Interlocked.CompareExchange(ref lazyNetModuleAttributesBag, CustomAttributesBag<CSharpAttributeData>.Empty, null); 1374ImmutableArray<CSharpAttributeData> attributesFromNetModules = GetNetModuleAttributes(out netModuleNames); 1432CustomAttributesBag<CSharpAttributeData> netModuleAttributesBag; 1436netModuleAttributesBag = new CustomAttributesBag<CSharpAttributeData>(); 1441if (netModuleAttributesBag.IsEmpty) netModuleAttributesBag = CustomAttributesBag<CSharpAttributeData>.Empty; 1445netModuleAttributesBag = CustomAttributesBag<CSharpAttributeData>.Empty; 1471ImmutableArray<CSharpAttributeData> attributesFromNetModules = GetNetModuleAttributes(out netModuleNames); 1484WellKnownAttributeData limitedDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> attributesFromNetModules, 1493HashSet<CSharpAttributeData> uniqueAttributes = null; 1500CSharpAttributeData attribute = attributesFromNetModules[i]; 1512void limitedDecodeWellKnownAttribute(CSharpAttributeData attribute, QuickAttributes attributeMatches, ref CommonAssemblyWellKnownAttributeData result) 1535private CustomAttributesBag<CSharpAttributeData> GetNetModuleAttributesBag() 1582private CustomAttributesBag<CSharpAttributeData> GetSourceAttributesBag() 1596public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 1663CustomAttributesBag<CSharpAttributeData>? attributesBag = _lazySourceAttributesBag; 1711CustomAttributesBag<CSharpAttributeData> attributesBag = _lazySourceAttributesBag; 1780private static IEnumerable<Cci.SecurityAttribute> GetSecurityAttributes(CustomAttributesBag<CSharpAttributeData> attributesBag) 1790foreach (var securityAttribute in securityData.GetSecurityAttributes<CSharpAttributeData>(attributesBag.Attributes)) 1941internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 2204private void DecodeTypeForwardedToAttribute(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 2272CSharpAttributeData attrData, 2360protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 2365private void DecodeWellKnownAttribute(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, int index, bool isFromNetModule) 2367var attribute = arguments.Attribute; 2615private static void ValidateIntegralAttributeNonNegativeArguments(CSharpAttributeData attribute, AttributeSyntax nodeOpt, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceClonedParameterSymbol.cs (1)
117public override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\Source\SourceComplexParameterSymbol.cs (27)
38private CustomAttributesBag<CSharpAttributeData> _lazyCustomAttributesBag; 580internal sealed override CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 614public ImmutableArray<(CSharpAttributeData, BoundAttribute)> BindParameterAttributes() 625if (CSharpAttributeData.IsTargetEarlyAttribute(attributeType, attributeSyntax, AttributeDescription.OptionalAttribute)) 642internal override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 644if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.DefaultParameterValueAttribute)) 648else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.DecimalConstantAttribute)) 652else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.DateTimeConstantAttribute)) 656else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.UnscopedRefAttribute)) 665if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.CallerLineNumberAttribute)) 669else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.CallerFilePathAttribute)) 673else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.CallerMemberNameAttribute)) 677else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.CallerArgumentExpressionAttribute)) 731private (CSharpAttributeData?, BoundAttribute?) EarlyDecodeAttributeForDefaultParameterValue(AttributeDescription description, ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 760protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 764var attribute = arguments.Attribute; 810MarshalAsAttributeDecoder<ParameterWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>.Decode(ref arguments, AttributeTargets.Parameter, MessageProvider.Instance); 908private static bool? DecodeMaybeNullWhenOrNotNullWhenOrDoesNotReturnIfAttribute(CSharpAttributeData attribute) 916private void DecodeDefaultParameterValueAttribute(AttributeDescription description, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 918var attribute = arguments.Attribute; 958private ConstantValue DecodeDefaultParameterValueAttribute(AttributeDescription description, CSharpAttributeData attribute, AttributeSyntax node, bool diagnose, BindingDiagnosticBag diagnosticsOpt) 977private ConstantValue DecodeDefaultParameterValueAttribute(CSharpAttributeData attribute, AttributeSyntax node, bool diagnose, BindingDiagnosticBag diagnosticsOpt) 1182private void ValidateCallerArgumentExpressionAttribute(AttributeSyntax node, CSharpAttributeData attribute, BindingDiagnosticBag diagnostics) 1281private void DecodeInterpolatedStringHandlerArgumentAttribute(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, BindingDiagnosticBag diagnostics, int attributeIndex) 1367int? decodeName(TypedConstant constant, ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1438static void setInterpolatedStringHandlerAttributeError(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1445internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData)
Symbols\Source\SourceConstructorSymbolBase.cs (2)
242internal override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 246if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.SetsRequiredMembersAttribute))
Symbols\Source\SourceEventFieldSymbol.cs (1)
59internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourceEventSymbol.cs (9)
35private CustomAttributesBag<CSharpAttributeData>? _lazyCustomAttributesBag; 205private CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 259public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 299internal override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 301CSharpAttributeData? attributeData; 342protected sealed override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 344var attribute = arguments.Attribute; 374CSharpAttributeData.DecodeSkipLocalsInitAttribute<CommonEventWellKnownAttributeData>(DeclaringCompilation, ref arguments); 386internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData>? attributes)
Symbols\Source\SourceFieldSymbol.cs (2)
114protected sealed override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 119var attribute = arguments.Attribute;
Symbols\Source\SourceFixedFieldSymbol.cs (2)
41internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 207internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourceMemberContainerSymbol.cs (2)
1572foreach (var attr in symbol.GetAttributes()) 6183internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourceMemberFieldSymbol.cs (2)
114internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 157internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData)
Symbols\Source\SourceMethodSymbol.cs (2)
138internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 144internal static void AddSynthesizedAttributes(MethodSymbol target, PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (36)
28private CustomAttributesBag<CSharpAttributeData> _lazyCustomAttributesBag; 29private CustomAttributesBag<CSharpAttributeData> _lazyReturnTypeCustomAttributesBag; 246private CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 263private CustomAttributesBag<CSharpAttributeData> GetReturnTypeAttributesBag() 274private CustomAttributesBag<CSharpAttributeData> GetAttributesBag(ref CustomAttributesBag<CSharpAttributeData> lazyCustomAttributesBag, bool forReturnType) 316public override ImmutableArray<CSharpAttributeData> GetAttributes() 325public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() 331internal override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 339if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.ConditionalAttribute)) 354else if (EarlyDecodeDeprecatedOrExperimentalOrObsoleteAttribute(ref arguments, out CSharpAttributeData? attributeData, out BoundAttribute? boundAttribute, out ObsoleteAttributeData? obsoleteData)) 363else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.UnmanagedCallersOnlyAttribute)) 371else if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.OverloadResolutionPriorityAttribute)) 401public ImmutableArray<(CSharpAttributeData, BoundAttribute)> BindMethodAttributes() 509protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 524private void DecodeWellKnownAttributeAppliedToMethod(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 528var attribute = arguments.Attribute; 538AttributeData.DecodeMethodImplAttribute<MethodWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>(ref arguments, MessageProvider.Instance, this.ContainingType); 592CSharpAttributeData.DecodeSkipLocalsInitAttribute<MethodWellKnownAttributeData>(DeclaringCompilation, ref arguments); 601CSharpAttributeData.DecodeMemberNotNullAttribute<MethodWellKnownAttributeData>(ContainingType, ref arguments); 606CSharpAttributeData.DecodeMemberNotNullWhenAttribute<MethodWellKnownAttributeData>(ContainingType, ref arguments); 703ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, 730private void ValidateConditionalAttribute(CSharpAttributeData attribute, AttributeSyntax node, BindingDiagnosticBag diagnostics) 794private void DecodeWellKnownAttributeAppliedToReturnValue(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 798var attribute = arguments.Attribute; 805MarshalAsAttributeDecoder<ReturnTypeWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>.Decode(ref arguments, AttributeTargets.ReturnValue, MessageProvider.Instance); 832private void DecodeDllImportAttribute(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 836var attribute = arguments.Attribute; 957private void DecodeModuleInitializerAttribute(DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1006private void DecodeInterceptsLocationAttribute(DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1024private void DecodeInterceptsLocationChecksumBased(DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, int version, string? data) 1165DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, 1191var attributeData = arguments.Attribute; 1389private void DecodeUnmanagedCallersOnlyAttribute(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1445static UnmanagedCallersOnlyAttributeData DecodeUnmanagedCallersOnlyAttributeData(SourceMethodSymbol @this, CSharpAttributeData attribute, Location location, BindingDiagnosticBag diagnostics) 1475internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData)
Symbols\Source\SourceModuleSymbol.cs (7)
44private CustomAttributesBag<CSharpAttributeData> _lazyCustomAttributesBag; 535private CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 558public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 580protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 584var attribute = arguments.Attribute; 616CSharpAttributeData.DecodeSkipLocalsInitAttribute<ModuleWellKnownAttributeData>(DeclaringCompilation, ref arguments); 663internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourceNamedTypeSymbol.cs (23)
32private CustomAttributesBag<CSharpAttributeData> _lazyCustomAttributesBag; 845private CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 867public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 907internal override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 910CSharpAttributeData? attributeData; 913if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.ComImportAttribute)) 928if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.CodeAnalysisEmbeddedAttribute)) 943if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.ConditionalAttribute)) 970if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.AttributeUsageAttribute)) 1002if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.InterpolatedStringHandlerAttribute)) 1017if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.InlineArrayAttribute)) 1035if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.CollectionBuilderAttribute)) 1055if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.UnionAttribute)) 1115protected sealed override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1120var attribute = arguments.Attribute; 1158AttributeData.DecodeStructLayoutAttribute<TypeWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>( 1195CSharpAttributeData.DecodeSkipLocalsInitAttribute<TypeWellKnownAttributeData>(DeclaringCompilation, ref arguments); 1316private AttributeUsageInfo DecodeAttributeUsageAttribute(CSharpAttributeData attribute, AttributeSyntax node, bool diagnose, BindingDiagnosticBag diagnosticsOpt = null) 1353private void DecodeCoClassAttribute(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1355var attribute = arguments.Attribute; 1406private void ValidateConditionalAttribute(CSharpAttributeData attribute, AttributeSyntax node, BindingDiagnosticBag diagnostics) 1636internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData) 1735internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (3)
785static void appendAttributes(ImmutableArray<CSharpAttributeData> attributes, StringBuilder builder) 794foreach (CSharpAttributeData attribute in attributes) 816static void appendAttribute(CSharpAttributeData attribute, StringBuilder builder)
Symbols\Source\SourceParameterSymbol.cs (2)
191internal abstract CustomAttributesBag<CSharpAttributeData> GetAttributesBag(); 197public sealed override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\Source\SourceParameterSymbolBase.cs (2)
67internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 73internal static void AddSynthesizedAttributes(ParameterSymbol parameter, PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
846internal sealed override void AddSynthesizedReturnTypeAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 852internal void AddSynthesizedReturnTypeFlowAnalysisAttributes(ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Source\SourcePropertySymbolBase.cs (16)
71private CustomAttributesBag<CSharpAttributeData> _lazyCustomAttributesBag; 473CustomAttributesBag<CSharpAttributeData>? temp = null; 1315private CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 1360public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 1399internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 1464internal override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 1466CSharpAttributeData? attributeData; 1480if (CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.IndexerNameAttribute)) 1500else if ((IsIndexer || this.IsExtensionBlockMember()) && CSharpAttributeData.IsTargetEarlyAttribute(arguments.AttributeType, arguments.AttributeSyntax, AttributeDescription.OverloadResolutionPriorityAttribute)) 1544protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 1551var attribute = arguments.Attribute; 1570CSharpAttributeData.DecodeSkipLocalsInitAttribute<PropertyWellKnownAttributeData>(DeclaringCompilation, ref arguments); 1604CSharpAttributeData.DecodeMemberNotNullAttribute<PropertyWellKnownAttributeData>(ContainingType, ref arguments); 1609CSharpAttributeData.DecodeMemberNotNullWhenAttribute<PropertyWellKnownAttributeData>(ContainingType, ref arguments); 1727internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData) 1739private void ValidateIndexerNameAttribute(CSharpAttributeData attribute, AttributeSyntax node, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceSimpleParameterSymbol.cs (2)
154internal override CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 157return CustomAttributesBag<CSharpAttributeData>.Empty;
Symbols\Source\SourceTypeParameterSymbol.cs (7)
32private CustomAttributesBag<CSharpAttributeData> _lazyCustomAttributesBag; 167public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 178internal virtual CustomAttributesBag<CSharpAttributeData> GetAttributesBag() 195CustomAttributesBag<CSharpAttributeData> attributesBag = typeParameter.GetAttributesBag(); 386internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 404protected sealed override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 409var attribute = arguments.Attribute;
Symbols\SubstitutedEventSymbol.cs (1)
54public override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\SubstitutedFieldSymbol.cs (1)
77public override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\SubstitutedMethodSymbol.cs (3)
211public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 216public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() 495internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\SubstitutedNamedTypeSymbol.cs (2)
209public sealed override ImmutableArray<CSharpAttributeData> GetAttributes() 476internal override IEnumerable<CSharpAttributeData> GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder)
Symbols\SubstitutedParameterSymbol.cs (1)
133internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\SubstitutedPropertySymbol.cs (1)
63public override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\SubstitutedTypeParameterSymbol.cs (1)
26internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Symbol.cs (8)
880internal virtual void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 887internal static void AddSynthesizedAttribute(ref ArrayBuilder<CSharpAttributeData> attributes, CSharpAttributeData attribute) 893attributes = new ArrayBuilder<CSharpAttributeData>(1); 1545internal bool ReportExplicitUseOfReservedAttributes(in DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, ReservedAttributes permitted) 1547var attribute = arguments.Attribute; 1637bool reportExplicitUseOfReservedAttribute(CSharpAttributeData attribute, in DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments, in AttributeDescription attributeDescription)
Symbols\Symbol_Attributes.cs (30)
28public virtual ImmutableArray<CSharpAttributeData> GetAttributes() 35return ImmutableArray<CSharpAttributeData>.Empty; 142internal virtual (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 149out CSharpAttributeData? attributeData, 157if (CSharpAttributeData.IsTargetEarlyAttribute(type, syntax, AttributeDescription.ObsoleteAttribute)) 161else if (CSharpAttributeData.IsTargetEarlyAttribute(type, syntax, AttributeDescription.DeprecatedAttribute)) 165else if (CSharpAttributeData.IsTargetEarlyAttribute(type, syntax, AttributeDescription.WindowsExperimentalAttribute)) 169else if (CSharpAttributeData.IsTargetEarlyAttribute(type, syntax, AttributeDescription.ExperimentalAttribute)) 216protected void DecodeWellKnownAttribute(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 242protected virtual void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 264internal virtual void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData) 305ref CustomAttributesBag<CSharpAttributeData>? lazyCustomAttributesBag, 322ImmutableArray<CSharpAttributeData> boundAttributes; 333Interlocked.CompareExchange(ref lazyCustomAttributesBag, new CustomAttributesBag<CSharpAttributeData>(), null); 359var attributeDataArray = new CSharpAttributeData[totalAttributesCount]; 397boundAttributes = ImmutableArray<CSharpAttributeData>.Empty; 400Interlocked.CompareExchange(ref lazyCustomAttributesBag, CustomAttributesBag<CSharpAttributeData>.WithEmptyData(), null); 440if (lazyCustomAttributesBag.IsEmpty) lazyCustomAttributesBag = CustomAttributesBag<CSharpAttributeData>.Empty; 447void removeObsoleteDiagnosticsForForwardedTypes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> attributesToBind, ref BindingDiagnosticBag diagnostics) 479CSharpAttributeData boundAttribute = boundAttributes[i]; 545protected ImmutableArray<(CSharpAttributeData, BoundAttribute)> BindAttributes(OneOrMany<SyntaxList<AttributeListSyntax>> attributeDeclarations, Binder? rootBinder) 547var boundAttributeArrayBuilder = ArrayBuilder<(CSharpAttributeData, BoundAttribute)>.GetInstance(); 567private void RecordPresenceOfBadAttributes(ImmutableArray<CSharpAttributeData> boundAttributes) 569foreach (var attribute in boundAttributes) 782CSharpAttributeData?[] attributeDataArray, 810(CSharpAttributeData? earlyAttributeDataOpt, BoundAttribute? boundAttributeOpt) = this.EarlyDecodeWellKnownAttribute(ref arguments); 852ImmutableArray<CSharpAttributeData> boundAttributes, 864var arguments = new DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation>(); 871CSharpAttributeData boundAttribute = boundAttributes[i]; 899CSharpAttributeData attribute,
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
979internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (3)
144internal override (CSharpAttributeData?, BoundAttribute?) EarlyDecodeWellKnownAttribute(ref EarlyDecodeWellKnownAttributeArguments<EarlyWellKnownAttributeBinder, NamedTypeSymbol, AttributeSyntax, AttributeLocation> arguments) 153protected override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 161internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData)
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (2)
73internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 75foreach (CSharpAttributeData attr in ParameterSymbol.GetAttributes())
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
75internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
94internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (2)
81internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 87internal void AddSynthesizedFlowAnalysisAttributes(ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (4)
43internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 249protected sealed override void DecodeWellKnownAttributeImpl(ref DecodeWellKnownAttributeArguments<AttributeSyntax, CSharpAttributeData, AttributeLocation> arguments) 254var attribute = arguments.Attribute; 275internal override void PostDecodeWellKnownAttributes(ImmutableArray<CSharpAttributeData> boundAttributes, ImmutableArray<AttributeSyntax> allAttributeSyntaxNodes, BindingDiagnosticBag diagnostics, AttributeLocation symbolPart, WellKnownAttributeData decodedData)
Symbols\Synthesized\SynthesizedCollectionBuilderProjectedMethodSymbol.cs (3)
42public override ImmutableArray<CSharpAttributeData> GetAttributes() 119internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) => throw ExceptionUtilities.Unreachable(); 141internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) => throw ExceptionUtilities.Unreachable();
Symbols\Synthesized\SynthesizedContainer.cs (1)
56internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
190internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
421internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedEnumValueFieldSymbol.cs (1)
40internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
48internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
86internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
201internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
322internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Synthesized\SynthesizedParameterSymbol.cs (3)
146internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 381public override ImmutableArray<CSharpAttributeData> GetAttributes() 383return _baseParameterForAttributes?.GetAttributes() ?? ImmutableArray<CSharpAttributeData>.Empty;
Symbols\Synthesized\SynthesizedTypeParameterSymbol.cs (4)
47internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes) 54foreach (CSharpAttributeData attr in definition.GetAttributes()) 72public override ImmutableArray<CSharpAttributeData> GetAttributes() 79return ImmutableArray<CSharpAttributeData>.Empty;
Symbols\Synthesized\SynthesizedUnionCtor.cs (1)
71internal override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Tuples\TupleFieldSymbol.cs (2)
136public override ImmutableArray<CSharpAttributeData> GetAttributes() 327public override ImmutableArray<CSharpAttributeData> GetAttributes()
Symbols\TypeSymbol.cs (1)
1991foreach (var attributeData in implementingSymbol.GetAttributes())
Symbols\Wrapped\WrappedEventSymbol.cs (1)
171internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
213internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Wrapped\WrappedMethodSymbol.cs (1)
364internal abstract override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes);
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
265internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Wrapped\WrappedParameterSymbol.cs (2)
69public override ImmutableArray<CSharpAttributeData> GetAttributes() 74internal abstract override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes);
Symbols\Wrapped\WrappedPropertySymbol.cs (1)
199internal sealed override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes)
Symbols\Wrapped\WrappedTypeParameterSymbol.cs (2)
180public override ImmutableArray<CSharpAttributeData> GetAttributes() 185internal abstract override void AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ref ArrayBuilder<CSharpAttributeData> attributes);