Xour
Options pattern in a shared class library
Hello all, I am looking to use options pattern in a shared class library, but I am not sure how should I go about it. The project structure is something like this:
What I need is to somewhat use options pattern in, say,
Class_library_2
(or at least have access to the configuration provider in any way), but I am unsure what would be the proper way to do this.
If I register the config in the Startup.cs
of the Api_1
web project, those won't be available from Api_2
.
Should I create the option classes and register the config in both projects?
Any hints or advice? Thanks a lot!29 replies