49 references to EmbeddableAttributes
Microsoft.CodeAnalysis.CSharp (48)
Emitter\Model\PEAssemblyBuilder.cs (14)
323
EmbeddableAttributes
needsAttributes = GetNeedsGeneratedAttributes();
326
Compilation.CheckIfAttributeShouldBeEmbedded(
EmbeddableAttributes
.NullablePublicOnlyAttribute, diagnostics, Location.None))
328
needsAttributes |=
EmbeddableAttributes
.NullablePublicOnlyAttribute;
332
Compilation.CheckIfAttributeShouldBeEmbedded(
EmbeddableAttributes
.RefSafetyRulesAttribute, diagnostics, Location.None))
334
needsAttributes |=
EmbeddableAttributes
.RefSafetyRulesAttribute;
350
if ((needsAttributes &
EmbeddableAttributes
.IsReadOnlyAttribute) != 0)
359
if ((needsAttributes &
EmbeddableAttributes
.IsByRefLikeAttribute) != 0)
368
if ((needsAttributes &
EmbeddableAttributes
.IsUnmanagedAttribute) != 0)
377
if ((needsAttributes &
EmbeddableAttributes
.NullableAttribute) != 0)
386
if ((needsAttributes &
EmbeddableAttributes
.NullableContextAttribute) != 0)
395
if ((needsAttributes &
EmbeddableAttributes
.NullablePublicOnlyAttribute) != 0)
404
if ((needsAttributes &
EmbeddableAttributes
.NativeIntegerAttribute) != 0)
414
if ((needsAttributes &
EmbeddableAttributes
.ScopedRefAttribute) != 0)
423
if ((needsAttributes &
EmbeddableAttributes
.RefSafetyRulesAttribute) != 0)
Emitter\Model\PEModuleBuilder.cs (11)
58
internal
EmbeddableAttributes
GetNeedsGeneratedAttributes()
64
private
EmbeddableAttributes
GetNeedsGeneratedAttributesInternal()
66
return (
EmbeddableAttributes
)_needsGeneratedAttributes | Compilation.GetNeedsGeneratedAttributes();
69
private void SetNeedsGeneratedAttributes(
EmbeddableAttributes
attributes)
1778
private void EnsureEmbeddableAttributeExists(
EmbeddableAttributes
attribute)
1796
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.IsReadOnlyAttribute);
1801
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.IsUnmanagedAttribute);
1806
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.NullableAttribute);
1811
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.NullableContextAttribute);
1817
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.NativeIntegerAttribute);
1822
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.ScopedRefAttribute);
Symbols\Compilation_WellKnownMembers.cs (23)
43
internal
EmbeddableAttributes
GetNeedsGeneratedAttributes()
46
return (
EmbeddableAttributes
)_needsGeneratedAttributes;
49
private void SetNeedsGeneratedAttributes(
EmbeddableAttributes
attributes)
508
private void EnsureEmbeddableAttributeExists(
EmbeddableAttributes
attribute, BindingDiagnosticBag? diagnostics, Location location, bool modifyCompilation)
517
if ((attribute & (
EmbeddableAttributes
.NullableAttribute |
EmbeddableAttributes
.NullableContextAttribute)) != 0 &&
526
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.IsReadOnlyAttribute, diagnostics, location, modifyCompilation);
531
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.IsByRefLikeAttribute, diagnostics, location, modifyCompilation);
536
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.IsUnmanagedAttribute, diagnostics, location, modifyCompilation);
541
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.NullableAttribute, diagnostics, location, modifyCompilation);
546
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.NullableContextAttribute, diagnostics, location, modifyCompilation);
552
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.NativeIntegerAttribute, diagnostics, location, modifyCompilation);
557
EnsureEmbeddableAttributeExists(
EmbeddableAttributes
.ScopedRefAttribute, diagnostics, location, modifyCompilation);
560
internal bool CheckIfAttributeShouldBeEmbedded(
EmbeddableAttributes
attribute, BindingDiagnosticBag? diagnosticsOpt, Location locationOpt)
564
case
EmbeddableAttributes
.IsReadOnlyAttribute:
571
case
EmbeddableAttributes
.IsByRefLikeAttribute:
578
case
EmbeddableAttributes
.IsUnmanagedAttribute:
585
case
EmbeddableAttributes
.NullableAttribute:
594
case
EmbeddableAttributes
.NullableContextAttribute:
601
case
EmbeddableAttributes
.NullablePublicOnlyAttribute:
608
case
EmbeddableAttributes
.NativeIntegerAttribute:
618
case
EmbeddableAttributes
.ScopedRefAttribute:
625
case
EmbeddableAttributes
.RefSafetyRulesAttribute:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Attributes\AttributeTests_RefReadOnly.cs (1)
2563
return (compilation.GetNeedsGeneratedAttributes() &
EmbeddableAttributes
.IsReadOnlyAttribute) != 0;