Browse Source

MethodUsedByAnalyzer: Hide for unresolved methods

pull/2677/head
James May 4 years ago
parent
commit
f8353d3181
  1. 2
      ILSpy/Analyzers/Builtin/MethodUsedByAnalyzer.cs

2
ILSpy/Analyzers/Builtin/MethodUsedByAnalyzer.cs

@ -38,7 +38,7 @@ namespace ICSharpCode.ILSpy.Analyzers.Builtin
{ {
const GetMemberOptions Options = GetMemberOptions.IgnoreInheritedMembers | GetMemberOptions.ReturnMemberDefinitions; const GetMemberOptions Options = GetMemberOptions.IgnoreInheritedMembers | GetMemberOptions.ReturnMemberDefinitions;
public bool Show(ISymbol symbol) => symbol is IMethod method && !method.IsVirtual; public bool Show(ISymbol symbol) => symbol is IMethod method && !method.IsVirtual && method.ParentModule is not null;
public IEnumerable<ISymbol> Analyze(ISymbol analyzedSymbol, AnalyzerContext context) public IEnumerable<ISymbol> Analyze(ISymbol analyzedSymbol, AnalyzerContext context)
{ {

Loading…
Cancel
Save