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

Update logic for AbstractDynamicLinqCustomTypeProvider.GetAssemblyTypesWithDynamicLinqTypeAttribute #703

Merged
merged 4 commits into from
May 15, 2023

Conversation

StefH
Copy link
Collaborator

@StefH StefH commented May 3, 2023

@StefH StefH added the feature label May 3, 2023
@StefH StefH self-assigned this May 3, 2023
@StefH StefH changed the title Stef 702 Update logic for AbstractDynamicLinqCustomTypeProvider.GetAssemblyTypesWithDynamicLinqTypeAttribute May 3, 2023
Copy link

@philr philr left a comment

Choose a reason for hiding this comment

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

For .NET Framework, this is changing from calling assembly.GetExportedTypes() to assembly.GetTypes(). That allows the ReflectionTypeLoadException to be handled, but changes the behaviour to returning all the types in the assembly instead of just the public types. I don't know if you were intending change that? If not, the result can be filtered down to just the public types.

.NET Standard changes from assembly.ExportedTypes to assembly.GetExportedTypes(). GetExportedTypes() won't ever throw ReflectionTypeLoadException according to the documentation. This should be changed to assembly.GetTypes() like the .NET Framework version of the code (and potentially filtered to just public types)?

@StefH StefH merged commit d8754c2 into master May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants