protected sealed override TAttributeData PortAttributeIfNeedTo( TAttributeData attrData, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics ) { // Note, when porting attributes, we are not using constructors from original symbol. // The constructors might be missing (for example, in metadata case) and doing lookup // will ensure that we report appropriate errors. if ( TypeManager.IsTargetAttribute( UnderlyingMethod, attrData, AttributeDescription.LCIDConversionAttribute ) ) { if (attrData.CommonConstructorArguments.Length == 1) { return(TypeManager.CreateSynthesizedAttribute( WellKnownMember.System_Runtime_InteropServices_LCIDConversionAttribute__ctor, attrData, syntaxNodeOpt, diagnostics )); } } return(null); }
private bool IsTargetAttribute( TAttributeData attrData, AttributeDescription description ) { return(TypeManager.IsTargetAttribute(UnderlyingNamedType, attrData, description)); }