27 references to ReadOnly
Microsoft.CodeAnalysis.CSharp (27)
Parser\LanguageParser.cs (1)
1320return DeclarationModifiers.ReadOnly;
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
49=> (Modifiers & DeclarationModifiers.ReadOnly) != 0;
Symbols\Source\ModifierUtils.cs (3)
299case DeclarationModifiers.ReadOnly: 357return DeclarationModifiers.ReadOnly; 502case FieldSymbol when (modifiers & DeclarationModifiers.ReadOnly) != 0:
Symbols\Source\SourceEventSymbol.cs (2)
400get { return (_modifiers & DeclarationModifiers.ReadOnly) != 0; } 495allowedModifiers |= DeclarationModifiers.ReadOnly;
Symbols\Source\SourceMemberContainerSymbol.cs (2)
329allowedModifiers |= DeclarationModifiers.Partial | DeclarationModifiers.ReadOnly | DeclarationModifiers.Unsafe; 845public override bool IsReadOnly => HasFlag(DeclarationModifiers.ReadOnly);
Symbols\Source\SourceMemberFieldSymbol.cs (4)
175DeclarationModifiers.ReadOnly | 203reportBadMemberFlagIfAny(result, DeclarationModifiers.ReadOnly, diagnostics, errorLocation); 208result &= ~(DeclarationModifiers.Static | DeclarationModifiers.ReadOnly | DeclarationModifiers.Const | DeclarationModifiers.Volatile | DeclarationModifiers.Required); 220reportBadMemberFlagIfAny(result, DeclarationModifiers.ReadOnly, diagnostics, errorLocation);
Symbols\Source\SourceMemberMethodSymbol.cs (1)
679return (this.DeclarationModifiers & DeclarationModifiers.ReadOnly) != 0;
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
741allowedModifiers |= DeclarationModifiers.ReadOnly;
Symbols\Source\SourcePropertyAccessorSymbol.cs (3)
252propertyModifiers & ~(DeclarationModifiers.Indexer | DeclarationModifiers.ReadOnly); 432internal bool LocalDeclaredReadOnly => (DeclarationModifiers & DeclarationModifiers.ReadOnly) != 0; 503allowedModifiers |= DeclarationModifiers.ReadOnly;
Symbols\Source\SourcePropertySymbol.cs (1)
428allowedModifiers |= DeclarationModifiers.ReadOnly;
Symbols\Source\SourcePropertySymbolBase.cs (1)
602internal bool HasReadOnlyModifier => (_modifiers & DeclarationModifiers.ReadOnly) != 0;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
24DeclarationModifiers.Public | (IsReadOnly(containingType, positionalMembers) ? DeclarationModifiers.ReadOnly : 0))
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
25(containingType.IsRecordStruct ? DeclarationModifiers.ReadOnly : 0))
Symbols\Synthesized\Records\SynthesizedRecordObjectMethod.cs (1)
16DeclarationModifiers.Public | DeclarationModifiers.Override | (isReadOnly ? DeclarationModifiers.ReadOnly : 0))
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
55result |= DeclarationModifiers.ReadOnly;
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
36(isReadOnly ? DeclarationModifiers.ReadOnly : DeclarationModifiers.None) |
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (2)
37(isReadOnly ? DeclarationModifiers.ReadOnly : DeclarationModifiers.None) | 107get { return (_modifiers & DeclarationModifiers.ReadOnly) != 0; }