Excel-DNA / Excel-DNA/Registration

Expanding GetExcelFunctions filter condition to include both ExcelFunctionAttribute and ExcelFunctionDocsAttribute ?

Open
#33 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
37
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Hi

I raised a issue for a conflict between ExcelFunction and ExcelFunctionDoc attribute as both of them include the same property `ExplicitRegistration
`
https://github.com/Excel-DNA/ExcelDnaDoc/issues/36

My goal is to use the Registration so I can have default parameter value. However in the Registration.CS the following function
stipulates only function with `ExcelFunction` attribute will be registered. This seems to be a catch 22 situation for me. I am not if this is a real oversight. And if it indeed is do you want to fix here or in the doc gen solution ( which can not support both attribute at the same time otherwise it will fail with System.Reflection.AmbiguousMatchException)

```
public static IEnumerable GetExcelFunctions()
{
return from ass in ExcelIntegration.GetExportedAssemblies()
from typ in ass.GetTypes()
from mi in typ.GetMethods(BindingFlags.Public | BindingFlags.Static)
where mi.GetCustomAttribute() != null
select new ExcelFunctionRegistration(mi);
}

```

Thank you very much
casbby

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.