Factor out binding logic for DynamicallyAccessedMemberTypes#1223
Merged
Conversation
vitek-karas
approved these changes
May 31, 2020
| using System.Reflection; | ||
| using Mono.Cecil; | ||
|
|
||
| namespace Mono.Linker.Dataflow |
Member
There was a problem hiding this comment.
Nit: Maybe we should put this into Mono.Linker namespace as it's not DataFlow-only anymore... but I'm fine either way
Contributor
There was a problem hiding this comment.
Yep, this should go to something like Mono.Linker.TypeDefinitionLookup class and possibly changed to extension methods
Member
Author
There was a problem hiding this comment.
Changed to Mono.Linker with extension methods. I kept the class name because this is specific to the DynamicallyAccessedMemberTypes, and doesn't have other member lookup logic.
This will be used for DynamicDependencyAttribute as well.
Instead of type itself for DynamicallyAccessedMemberTypes.All
- Add clarifying comments
MichalStrehovsky
approved these changes
Jun 2, 2020
tkapin
pushed a commit
to tkapin/runtime
that referenced
this pull request
Jan 31, 2023
…inker#1223) * Factor out binding logic for DynamicallyAccessedMemberTypes This will be used for DynamicDependencyAttribute as well. * Use null sentinel Instead of type itself for DynamicallyAccessedMemberTypes.All * PR feedback - Add clarifying comments * Change namespace and use extension methods Commit migrated from dotnet/linker@1758eaa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will be used for DynamicDependencyAttribute as well.
In #1215 (comment) there were concerns about the performance of
HasFlag, potentially boxing on Unity for example. Let's continue the discussion here.