Browse Source

Add tree node icon for Static Class.

pull/170/head
Ed Harvey 14 years ago
parent
commit
87d700d4d9
  1. 15
      ILSpy/TreeNodes/TypeTreeNode.cs

15
ILSpy/TreeNodes/TypeTreeNode.cs

@ -146,8 +146,10 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -146,8 +146,10 @@ namespace ICSharpCode.ILSpy.TreeNodes
} else {
if (type.IsInterface)
return TypeIcon.Interface;
else if (type.BaseType != null && type.BaseType.FullName == typeof(MulticastDelegate).FullName)
else if (IsDelegate(type))
return TypeIcon.Delegate;
else if (IsStaticClass(type))
return TypeIcon.StaticClass;
else
return TypeIcon.Class;
}
@ -178,6 +180,17 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -178,6 +180,17 @@ namespace ICSharpCode.ILSpy.TreeNodes
}
return overlay;
}
private static bool IsDelegate(TypeDefinition type)
{
return type.BaseType != null && type.BaseType.FullName == typeof(MulticastDelegate).FullName;
}
private static bool IsStaticClass(TypeDefinition type)
{
return type.IsSealed && type.IsAbstract;
}
#endregion
MemberReference IMemberTreeNode.Member {

Loading…
Cancel
Save