From 6c5380998e2ae46030170692590eecd922a2097f Mon Sep 17 00:00:00 2001 From: Linquize Date: Sun, 6 Apr 2014 14:58:58 +0800 Subject: [PATCH] Disable Search MSDN context menu if namespace is empty --- ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs b/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs index f5c3e0f5f..924c90d09 100644 --- a/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs +++ b/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs @@ -71,6 +71,10 @@ namespace ICSharpCode.ILSpy.TreeNodes var methodNode = node as MethodTreeNode; if (methodNode != null && (!methodNode.IsPublicAPI || !methodNode.MethodDefinition.DeclaringType.IsPublic)) return false; + + var namespaceNode = node as NamespaceTreeNode; + if (namespaceNode != null && string.IsNullOrEmpty(namespaceNode.Name)) + return false; } return true;