20 overrides of IsReadOnly
Microsoft.CodeAnalysis.CSharp (19)
Symbols\AnonymousTypes\PublicSymbols\AnonymousManager.TypeOrDelegatePublicSymbol.cs (1)
121
public sealed override bool
IsReadOnly
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
176
public sealed override bool
IsReadOnly
Symbols\ArrayTypeSymbol.cs (1)
251
public sealed override bool
IsReadOnly
Symbols\DynamicTypeSymbol.cs (1)
122
public sealed override bool
IsReadOnly
Symbols\ErrorTypeSymbol.cs (1)
125
public sealed override bool
IsReadOnly
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
79
public override bool
IsReadOnly
=> false;
Symbols\FunctionTypeSymbol.cs (1)
108
public override bool
IsReadOnly
=> true;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2715
public override bool
IsReadOnly
Symbols\PointerTypeSymbol.cs (1)
122
public sealed override bool
IsReadOnly
Symbols\Source\SourceMemberContainerSymbol.cs (1)
866
public override bool
IsReadOnly
=> HasFlag(DeclarationModifiers.ReadOnly);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
149
public override bool
IsReadOnly
=> false;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
826
public override bool
IsReadOnly
=> false;
Symbols\Synthesized\SynthesizedContainer.cs (1)
158
public sealed override bool
IsReadOnly
=> false;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
99
public override bool
IsReadOnly
=> false;
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
106
public override bool
IsReadOnly
=> false;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
74
public override bool
IsReadOnly
=> true;
Symbols\Synthesized\SynthesizedPrivateImplementationDetailsType.cs (1)
67
public override bool
IsReadOnly
=> false;
Symbols\TypeParameterSymbol.cs (1)
610
public sealed override bool
IsReadOnly
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
232
public override bool
IsReadOnly
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\MockNamedTypeSymbol.cs (1)
211
public sealed override bool
IsReadOnly
54 references to IsReadOnly
Microsoft.CodeAnalysis.CSharp (11)
Lowering\SpillSequenceSpiller.cs (1)
1077
result = receiver.Type.
IsReadOnly
? RefKind.In : RefKind.Ref;
Symbols\MethodSymbol.cs (1)
369
internal virtual bool IsEffectivelyReadOnly => (IsDeclaredReadOnly || ContainingType?.
IsReadOnly
== true) && IsValidReadOnlyTarget;
Symbols\PublicModel\TypeSymbol.cs (1)
184
bool ITypeSymbol.IsReadOnly => UnderlyingTypeSymbol.
IsReadOnly
;
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
97
if (!IsStatic && ContainingType.
IsReadOnly
)
Symbols\Source\SourceMemberMethodSymbol.cs (1)
984
if (IsDeclaredReadOnly && !ContainingType.
IsReadOnly
)
Symbols\Source\SourceMethodSymbol.cs (1)
113
if (target.IsDeclaredReadOnly && !target.ContainingType.
IsReadOnly
)
Symbols\Source\SourcePropertySymbolBase.cs (2)
817
if (!IsStatic && ContainingType.
IsReadOnly
)
891
if (ContainingType.
IsReadOnly
)
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
296
return containingType.
IsReadOnly
|| (containingType.IsRecordStruct && AreAllPrintablePropertyGettersReadOnly(userDefinedMembers));
Symbols\Synthesized\Records\SynthesizedRecordPropertySymbol.cs (1)
74
return !container.IsStructType() || container.
IsReadOnly
;
Symbols\Wrapped\WrappedNamedTypeSymbol.cs (1)
234
get { return _underlyingType.
IsReadOnly
; }
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (23)
CodeGen\CodeGenReadonlyStructTests.cs (23)
828
Assert.True(namedType.
IsReadOnly
);
845
Assert.True(namedType.
IsReadOnly
);
852
Assert.True(namedType.
IsReadOnly
);
859
Assert.True(namedType.
IsReadOnly
);
866
Assert.False(namedType.
IsReadOnly
);
873
Assert.False(namedType.
IsReadOnly
);
880
Assert.False(namedType.
IsReadOnly
);
886
Assert.False(type.
IsReadOnly
);
890
Assert.False(type.
IsReadOnly
);
894
Assert.False(type.
IsReadOnly
);
902
Assert.False(type.
IsReadOnly
);
911
Assert.True(s1.
IsReadOnly
);
1002
Assert.True(namedType.
IsReadOnly
);
1009
Assert.True(namedType.
IsReadOnly
);
1016
Assert.True(namedType.
IsReadOnly
);
1023
Assert.True(namedType.
IsReadOnly
);
1030
Assert.False(namedType.
IsReadOnly
);
1037
Assert.False(namedType.
IsReadOnly
);
1044
Assert.False(namedType.
IsReadOnly
);
1050
Assert.False(type.
IsReadOnly
);
1054
Assert.False(type.
IsReadOnly
);
1058
Assert.False(type.
IsReadOnly
);
1066
Assert.False(type.
IsReadOnly
);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Attributes\AttributeTests_ReadOnlyStruct.cs (7)
40
Assert.True(type.
IsReadOnly
);
59
Assert.True(type.
IsReadOnly
);
77
Assert.True(type.
IsReadOnly
);
95
Assert.True(type.
IsReadOnly
);
113
Assert.True(type.
IsReadOnly
);
139
Assert.True(type.
IsReadOnly
);
435
Assert.True(type.
IsReadOnly
);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (13)
Parsing\ReadOnlyStructs.cs (13)
46
Assert.True(s1.
IsReadOnly
);
52
Assert.True(s2.
IsReadOnly
);
58
Assert.True(s3.
IsReadOnly
);
120
Assert.False(s1.
IsReadOnly
);
126
Assert.False(s2.
IsReadOnly
);
132
Assert.False(s3.
IsReadOnly
);
155
Assert.True(s1.
IsReadOnly
);
161
Assert.True(s2.
IsReadOnly
);
188
Assert.True(s1.
IsReadOnly
);
192
Assert.True(s2.
IsReadOnly
);
222
Assert.True(s1.
IsReadOnly
);
226
Assert.True(s2.
IsReadOnly
);
230
Assert.True(s3.
IsReadOnly
);