|
|
|
@ -55,10 +55,10 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -55,10 +55,10 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
{ |
|
|
|
|
if (entity == null || entity.MetadataToken.IsNil) |
|
|
|
|
return; |
|
|
|
|
switch (entity) { |
|
|
|
|
case ITypeDefinition td: |
|
|
|
|
if (mappingInfo == null) |
|
|
|
|
mappingInfo = CSharpDecompiler.GetCodeMappingInfo(entity.ParentModule.PEFile, entity.MetadataToken); |
|
|
|
|
switch (entity) { |
|
|
|
|
case ITypeDefinition td: |
|
|
|
|
namespaces.Add(td.Namespace); |
|
|
|
|
HandleAttributes(td.GetAttributes()); |
|
|
|
|
HandleTypeParameters(td.TypeParameters); |
|
|
|
@ -100,9 +100,6 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -100,9 +100,6 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
CollectNamespacesForTypeReference(param.Type); |
|
|
|
|
} |
|
|
|
|
HandleTypeParameters(method.TypeParameters); |
|
|
|
|
if (!method.MetadataToken.IsNil) { |
|
|
|
|
if (mappingInfo == null) |
|
|
|
|
mappingInfo = CSharpDecompiler.GetCodeMappingInfo(entity.ParentModule.PEFile, entity.MetadataToken); |
|
|
|
|
var reader = module.PEFile.Reader; |
|
|
|
|
var parts = mappingInfo.GetMethodParts((MethodDefinitionHandle)method.MetadataToken).ToList(); |
|
|
|
|
foreach (var part in parts) { |
|
|
|
@ -118,7 +115,6 @@ namespace ICSharpCode.Decompiler.CSharp
@@ -118,7 +115,6 @@ namespace ICSharpCode.Decompiler.CSharp
|
|
|
|
|
CollectNamespacesFromMethodBody(body, module); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case IProperty property: |
|
|
|
|
HandleAttributes(property.GetAttributes()); |
|
|
|
|