|
|
|
@ -95,6 +95,8 @@ namespace ICSharpCode.Decompiler.Ast
@@ -95,6 +95,8 @@ namespace ICSharpCode.Decompiler.Ast
|
|
|
|
|
if (settings.AnonymousMethods && IsAnonymousMethodCacheField(field)) |
|
|
|
|
return true; |
|
|
|
|
if (settings.AutomaticProperties && IsAutomaticPropertyBackingField(field)) |
|
|
|
|
return true; |
|
|
|
|
if (settings.SwitchStatementOnString && IsSwitchOnStringCache(field)) |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
// event-fields are not [CompilerGenerated]
|
|
|
|
@ -105,6 +107,11 @@ namespace ICSharpCode.Decompiler.Ast
@@ -105,6 +107,11 @@ namespace ICSharpCode.Decompiler.Ast
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static bool IsSwitchOnStringCache(FieldDefinition field) |
|
|
|
|
{ |
|
|
|
|
return field.Name.StartsWith("<>f__switch", StringComparison.Ordinal); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static bool IsAutomaticPropertyBackingField(FieldDefinition field) |
|
|
|
|
{ |
|
|
|
|
return field.HasGeneratedName() && field.Name.EndsWith("BackingField", StringComparison.Ordinal); |
|
|
|
|