|
|
|
@ -1972,7 +1972,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
@@ -1972,7 +1972,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
|
|
|
|
|
} |
|
|
|
|
if (this.ShowAccessibility && accessor.Accessibility != ownerAccessibility) |
|
|
|
|
decl.Modifiers = ModifierFromAccessibility(accessor.Accessibility); |
|
|
|
|
if (accessor.HasReadonlyModifier()) |
|
|
|
|
if (this.ShowModifiers && accessor.HasReadonlyModifier()) |
|
|
|
|
decl.Modifiers |= Modifiers.Readonly; |
|
|
|
|
TokenRole keywordRole = kind switch { |
|
|
|
|
MethodSemanticsAttributes.Getter => PropertyDeclaration.GetKeywordRole, |
|
|
|
@ -2035,7 +2035,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
@@ -2035,7 +2035,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
|
|
|
|
|
|
|
|
|
|
static void MergeReadOnlyModifiers(EntityDeclaration decl, Accessor accessor1, Accessor accessor2) |
|
|
|
|
{ |
|
|
|
|
if (accessor1.HasModifier(Modifiers.Readonly) && accessor1.Role == PropertyDeclaration.GetterRole && accessor2.IsNull) |
|
|
|
|
if (accessor1.HasModifier(Modifiers.Readonly) && accessor2.IsNull) |
|
|
|
|
{ |
|
|
|
|
accessor1.Modifiers &= ~Modifiers.Readonly; |
|
|
|
|
decl.Modifiers |= Modifiers.Readonly; |
|
|
|
@ -2047,6 +2047,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
@@ -2047,6 +2047,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
|
|
|
|
|
decl.Modifiers |= Modifiers.Readonly; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
IndexerDeclaration ConvertIndexer(IProperty indexer) |
|
|
|
|
{ |
|
|
|
|
IndexerDeclaration decl = new IndexerDeclaration(); |
|
|
|
|