diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 2b4c2f3ba..a510305de 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -246,6 +246,7 @@ + diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index ec526d543..d84a5412f 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -62,6 +62,7 @@ namespace ICSharpCode.ILSpy private static readonly BitmapImage VirtualMethod = LoadBitmap("VirtualMethod"); private static readonly BitmapImage Operator = LoadBitmap("Operator"); private static readonly BitmapImage ExtensionMethod = LoadBitmap("ExtensionMethod"); + private static readonly BitmapImage PInvokeMethod = LoadBitmap("PInvokeMethod"); private static readonly BitmapImage Property = LoadBitmap("Property"); private static readonly BitmapImage Indexer = LoadBitmap("Indexer"); @@ -159,6 +160,7 @@ namespace ICSharpCode.ILSpy PreloadPublicIconToCache(MemberIcon.VirtualMethod, Images.VirtualMethod); PreloadPublicIconToCache(MemberIcon.Operator, Images.Operator); PreloadPublicIconToCache(MemberIcon.ExtensionMethod, Images.ExtensionMethod); + PreloadPublicIconToCache(MemberIcon.PInvokeMethod, Images.PInvokeMethod); PreloadPublicIconToCache(MemberIcon.Event, Images.Event); } @@ -199,6 +201,9 @@ namespace ICSharpCode.ILSpy case MemberIcon.ExtensionMethod: baseImage = Images.ExtensionMethod; break; + case MemberIcon.PInvokeMethod: + baseImage = Images.PInvokeMethod; + break; case MemberIcon.Event: baseImage = Images.Event; break; diff --git a/ILSpy/Images/MemberIcon.cs b/ILSpy/Images/MemberIcon.cs index 3112a2cc7..3e8bcd80b 100644 --- a/ILSpy/Images/MemberIcon.cs +++ b/ILSpy/Images/MemberIcon.cs @@ -33,6 +33,7 @@ namespace ICSharpCode.ILSpy VirtualMethod, Operator, ExtensionMethod, + PInvokeMethod, Event } } diff --git a/ILSpy/Images/OverlayStatic.png b/ILSpy/Images/OverlayStatic.png index f12f33739..d87bc8928 100644 Binary files a/ILSpy/Images/OverlayStatic.png and b/ILSpy/Images/OverlayStatic.png differ diff --git a/ILSpy/Images/PInvokeMethod.png b/ILSpy/Images/PInvokeMethod.png new file mode 100644 index 000000000..4b7e9fcc9 Binary files /dev/null and b/ILSpy/Images/PInvokeMethod.png differ diff --git a/ILSpy/TreeNodes/MethodTreeNode.cs b/ILSpy/TreeNodes/MethodTreeNode.cs index 8a5817ba2..9c8f57f7c 100644 --- a/ILSpy/TreeNodes/MethodTreeNode.cs +++ b/ILSpy/TreeNodes/MethodTreeNode.cs @@ -90,10 +90,13 @@ namespace ICSharpCode.ILSpy.TreeNodes } if (method.IsSpecialName && - (method.Name == ".ctor" || method.Name == ".cctor")) { + (method.Name == ".ctor" || method.Name == ".cctor")) { return Images.GetIcon(MemberIcon.Constructor, GetOverlayIcon(method.Attributes), false); } + if (method.HasPInvokeInfo) + return Images.GetIcon(MemberIcon.PInvokeMethod, GetOverlayIcon(method.Attributes), true); + bool showAsVirtual = method.IsVirtual && !(method.IsNewSlot && method.IsFinal) && !method.DeclaringType.IsInterface; return Images.GetIcon(