Currently, to customize the report engine, for example to add some custom user functions, we have to either use the app config or provide a IConfiguration to ReportProcessor constructor, which seems to set a static field for all reports, and on top of that we have to provide a whole assembly (which will load ALL non-private static methods, I did try to use typereferences instead of assemblyReferences, but that doesn't seem to work for custom functions).
Meanwhile all we needed was to expose a handful of functions. Our current workaround is to have a whole assembly dedicated to that.
It'd good to be able to:
- Specify either a single class or individual methods through the library API (e.g. reportProcessor.AddCustomFunction("name", (arg) => ...); or reportProcessor.AddCustomFunctions(typeof(MyCustomFunctions);)
- Avoid using static state (it limits how the library can be used and, more importantly, tested)
- Maybe have a way to provide a Service Provider, that Telerik library would use to create services/classes and pull IConfiguration from, especially those we provide, that way the custom functions could use services from our application, rather than using all static methods.
Thank you,