You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using feature/workspaces DotNetWorkspace to analyze an abstract method should find all of the direct implementations, but only looks for types that implement the abstract method's declaring type.
To Reproduce
using System;
using System.Linq;
using AsmResolver.DotNet;
using AsmResolver.Workspaces.DotNet;
var path = "Issue.dll";
var module = ModuleDefinition.FromFile(path);
var workspace = new DotNetWorkspace();
workspace.Assemblies.Add(module.Assembly);
workspace.Analyze();
var type = module.TopLevelTypes.First(d=>d.Name == "TestAbstractClass");
var method = type.Methods.First(d => d.Name == "TestAbstractBool");
var node = workspace.Index.GetOrCreateNode(method);
var impls = node.BackwardRelations.GetObjects(DotNetRelations.ImplementationMethod).ToArray();
foreach (var impl in impls)
{
Console.WriteLine(impl.DeclaringType.Name);
}
Console.WriteLine(impls.Length == 3);
Describe the bug
Using feature/workspaces DotNetWorkspace to analyze an abstract method should find all of the direct implementations, but only looks for types that implement the abstract method's declaring type.
To Reproduce
Issue.zip
Proposal
Should perhaps look recursively for the types that implement the abstract method's declaring type
Screenshots
Platform
The text was updated successfully, but these errors were encountered: