ExcelDnaDoc
ExcelDnaDoc copied to clipboard
Public vs internal types for UDFs
-- 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
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.
I think the UDFs considered should match. I don't know whether the ExcelDnaDoc takes the ExcplictExports directive into account, but it probably should.
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 :-)