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

Public vs internal types for UDFs #37

Open
Phundamentals opened this issue Nov 19, 2021 · 3 comments
Open

Public vs internal types for UDFs #37

Phundamentals opened this issue Nov 19, 2021 · 3 comments

Comments

@Phundamentals
Copy link

Phundamentals commented Nov 19, 2021

-- Edited, reworded because I was mixing up concepts ---

Hi,

Would you consider changing the types whose public methods are considered applicable for ExcelFunctionDoc etc from GetExportedTypes to GetTypes, so public methods from internal types are considered as well?

ExcelDna itself allows UDFs to be in internal types, so the behavior would be the same.
I myself have a class hierarchy that should not be completely exposed as public, hence my question.

Regards,

Sascha

@Phundamentals Phundamentals changed the title Public vs exported types Internal vs exported types Nov 19, 2021
@Phundamentals Phundamentals changed the title Internal vs exported types Public vs internal types Nov 19, 2021
@Phundamentals Phundamentals changed the title Public vs internal types Public vs internal types for UDFs Nov 19, 2021
@Phundamentals
Copy link
Author

I now see the comment in Excel-DNAs AssemblyLoader:

// NOTE: The fact that NonPublic types are returned here, and processed as-if they were public
//       was a mistake. But it would be a serious breaking change to go back, so we'll leave it as is.

So I'm assuming you don't want to introduce this to ExcelDnaDoc as well.

@govert
Copy link
Member

govert commented Nov 20, 2021

I think the UDFs considered should match. I don't know whether the ExcelDnaDoc takes the ExcplictExports directive into account, but it probably should.

@Phundamentals
Copy link
Author

Excel-DNA uses .GetTypes() with the comment mentioned above, while ExcelDnaDoc uses .GetExportedTypes(), so there is a discrepancy. The fact I want ExcelDnaDoc to use .GetTypes() as well might indicate bad programming on my part :-)

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

No branches or pull requests

2 participants