|
|
|
@ -70,14 +70,14 @@ namespace ICSharpCode.Decompiler.Ast
@@ -70,14 +70,14 @@ namespace ICSharpCode.Decompiler.Ast
|
|
|
|
|
if (method != null) { |
|
|
|
|
if (method.IsGetter || method.IsSetter || method.IsAddOn || method.IsRemoveOn) |
|
|
|
|
return true; |
|
|
|
|
if (settings.AnonymousMethods && IsGeneratedMemberName(method.Name) && method.IsCompilerGenerated()) |
|
|
|
|
if (settings.AnonymousMethods && method.HasGeneratedName() && method.IsCompilerGenerated()) |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TypeDefinition type = member as TypeDefinition; |
|
|
|
|
if (type != null) { |
|
|
|
|
if (type.DeclaringType != null) { |
|
|
|
|
if (settings.AnonymousMethods && IsGeneratedMemberName(type.Name) && type.IsCompilerGenerated()) |
|
|
|
|
if (settings.AnonymousMethods && type.HasGeneratedName() && type.IsCompilerGenerated()) |
|
|
|
|
return true; |
|
|
|
|
if (settings.YieldReturn && YieldReturnDecompiler.IsCompilerGeneratorEnumerator(type)) |
|
|
|
|
return true; |
|
|
|
@ -92,9 +92,9 @@ namespace ICSharpCode.Decompiler.Ast
@@ -92,9 +92,9 @@ namespace ICSharpCode.Decompiler.Ast
|
|
|
|
|
FieldDefinition field = member as FieldDefinition; |
|
|
|
|
if (field != null) { |
|
|
|
|
if (field.IsCompilerGenerated()) { |
|
|
|
|
if (settings.AnonymousMethods && (IsGeneratedMemberName(field.Name) || field.Name.StartsWith("CS$<>", StringComparison.Ordinal))) |
|
|
|
|
if (settings.AnonymousMethods && (field.HasGeneratedName() || field.Name.StartsWith("CS$<>", StringComparison.Ordinal))) |
|
|
|
|
return true; |
|
|
|
|
if (settings.AutomaticProperties && IsGeneratedMemberName(field.Name) && field.Name.EndsWith("BackingField", StringComparison.Ordinal)) |
|
|
|
|
if (settings.AutomaticProperties && field.HasGeneratedName() && field.Name.EndsWith("BackingField", StringComparison.Ordinal)) |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
// event-fields are not [CompilerGenerated]
|
|
|
|
@ -104,11 +104,6 @@ namespace ICSharpCode.Decompiler.Ast
@@ -104,11 +104,6 @@ namespace ICSharpCode.Decompiler.Ast
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static bool IsGeneratedMemberName(string name) |
|
|
|
|
{ |
|
|
|
|
return name.StartsWith("<", StringComparison.Ordinal); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Runs the C# transformations on the compilation unit.
|
|
|
|
|