72 references to TrySynthesizeAttribute
Microsoft.CodeAnalysis.CSharp (70)
Emitter\Model\PEModuleBuilder.cs (10)
115return Compilation.TrySynthesizeAttribute(attributeConstructor); 1644return Compilation.TrySynthesizeAttribute(member, arguments, isOptionalUse: true); 1664return Compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_NullableContextAttribute__ctor, arguments, isOptionalUse: true); 1715return Compilation.TrySynthesizeAttribute(member, arguments, isOptionalUse: true); 1737return Compilation.TrySynthesizeAttribute(member, isOptionalUse: true); 1744return Compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_RefSafetyRulesAttribute__ctor, arguments, isOptionalUse: true); 1757return Compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_NullablePublicOnlyAttribute__ctor, arguments); 1763return Compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_IsReadOnlyAttribute__ctor); 1769return Compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_IsUnmanagedAttribute__ctor); 1775return Compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_IsByRefLikeAttribute__ctor);
Emitter\Model\SourceAssemblySymbolAdapter.cs (1)
27.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_ReferenceAssemblyAttribute__ctor, isOptionalUse: true);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
623return compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor);
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
36AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_DebuggerHiddenAttribute__ctor));
Lowering\MethodToClassRewriter.cs (1)
760AddSynthesizedAttribute(ref attributes, this.DeclaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_DebuggerHiddenAttribute__ctor));
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (1)
124AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_DebuggerHiddenAttribute__ctor));
Lowering\SynthesizedMethodBaseSymbol.cs (1)
84compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
239compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
152AddSynthesizedAttribute(ref attributes, manager.Compilation.TrySynthesizeAttribute(
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
172AddSynthesizedAttribute(ref attributes, Manager.Compilation.TrySynthesizeAttribute(
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (2)
164AddSynthesizedAttribute(ref attributes, Manager.Compilation.TrySynthesizeAttribute( 218return Manager.Compilation.TrySynthesizeAttribute(
Symbols\Compilation_WellKnownMembers.cs (9)
464return TrySynthesizeAttribute( 479return TrySynthesizeAttribute( 491return TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_DebuggerBrowsableAttribute__ctor, 505return TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_DebuggerStepThroughAttribute__ctor); 737return TrySynthesizeAttribute( 754return TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_DynamicAttribute__ctor); 763return TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_DynamicAttribute__ctorTransformFlags, arguments); 780return TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_TupleElementNamesAttribute__ctorTransformNames, args); 792return TrySynthesizeAttribute(WellKnownMember.System_AttributeUsageAttribute__ctor, arguments, namedArguments);
Symbols\MethodSymbol.cs (2)
1228AddSynthesizedAttribute(ref attributes, declaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_ObsoleteAttribute__ctor, 1235AddSynthesizedAttribute(ref attributes, declaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerFeatureRequiredAttribute__ctor,
Symbols\Source\SourceAssemblySymbol.cs (6)
1827var attribute = _compilation.TrySynthesizeAttribute( 1935AddSynthesizedAttribute(ref attributes, _compilation.TrySynthesizeAttribute( 1959AddSynthesizedAttribute(ref attributes, _compilation.TrySynthesizeAttribute( 1978AddSynthesizedAttribute(ref attributes, _compilation.TrySynthesizeAttribute( 2011AddSynthesizedAttribute(ref attributes, _compilation.TrySynthesizeAttribute(WellKnownMember.System_Reflection_AssemblyKeyNameAttribute__ctor, ImmutableArray.Create(typedConstant))); 2021AddSynthesizedAttribute(ref attributes, _compilation.TrySynthesizeAttribute(WellKnownMember.System_Reflection_AssemblyKeyFileAttribute__ctor, ImmutableArray.Create(typedConstant)));
Symbols\Source\SourceEventFieldSymbol.cs (1)
64AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Source\SourceFixedFieldSymbol.cs (2)
49AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute( 210AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_UnsafeValueTypeAttribute__ctor));
Symbols\Source\SourceMemberFieldSymbol.cs (1)
127this.DeclaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_RequiredMemberAttribute__ctor));
Symbols\Source\SourceMemberMethodSymbol.cs (3)
939compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_AsyncIteratorStateMachineAttribute__ctor, 945compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_AsyncStateMachineAttribute__ctor, 951compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_IteratorStateMachineAttribute__ctor,
Symbols\Source\SourceModuleSymbol.cs (1)
585AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(
Symbols\Source\SourceNamedTypeSymbol.cs (7)
1559AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_ExtensionAttribute__ctor)); 1578AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_ObsoleteAttribute__ctor, 1585AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerFeatureRequiredAttribute__ctor, 1601AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute( 1609this.DeclaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor)); 1616compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_RequiredMemberAttribute__ctor)); 1633compilation.TrySynthesizeAttribute(
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (1)
444AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(
Symbols\Source\SourceParameterSymbolBase.cs (1)
77AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_ParamArrayAttribute__ctor));
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
788AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Source\SourcePropertySymbolBase.cs (1)
1155compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_RequiredMemberAttribute__ctor));
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (2)
65AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor)); 70AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_CodeAnalysis_SetsRequiredMembersAttribute__ctor));
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (2)
91AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor)); 157AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (1)
86AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\Records\SynthesizedRecordOrdinaryMethod.cs (1)
71AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
49AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\SynthesizedContainer.cs (1)
73AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
174moduleBuilder.Compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\SynthesizedEventAccessorSymbol.cs (1)
71AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
57AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\SynthesizedParameterSymbol.cs (2)
186AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_CodeAnalysis_UnscopedRefAttribute__ctor)); 191AddSynthesizedAttribute(ref attributes, compilation.TrySynthesizeAttribute(WellKnownMember.System_ParamArrayAttribute__ctor));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Attributes\AttributeTests_Synthesized.cs (2)
1962var attribute = comp.TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_DebuggerDisplayAttribute__ctor); 1966var attribute2 = comp.TrySynthesizeAttribute(