Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] New assembly resolving pipeline + some nuget resolving heuristics #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mxprshn
Copy link
Member

@mxprshn mxprshn commented Oct 13, 2022

  • Introduce IAssemblyResolver interface for assembly name -> assembly path searchers; wrap existing Microsoft API searchers with it
  • Add some IAssemblyResolver with heuristics for .NET Framework dll's from NuGet packages resolving (for example, JetBrains ReSharper API)
  • Don't fail when some types cannot be resolved, work with those which can

{
foreach (var m in t.GetMethods(bindingFlags))
{
if (m.GetMethodBody() != null)
global::System.Reflection.MethodBody methodBody = null;
var hasByRefLikes = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кажется, что по умолчанию лучше это выставить в false, и назвать "hasRefLikes", если имеются ввиду ref-like структуры

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В .NET оно называется именно "ByRefLike", поэтому название можно оставить

Comment on lines +212 to +213
methodBody = m.GetMethodBody();
hasByRefLikes = Reflection.hasByRefLikes(m);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Насколько я понял, эксепшен может произойти во время "m.GetMethodBody()", тогда логичнее вначале вычислить "Reflection.hasByRefLikes(m)", если это необходимо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants