Closed janpieterz closed 5 years ago
We are in agreement in spirit and (mostly) in practice! v3.0 greatly removed the configuration aspect. As you mentioned, DI is only used for logging. Logging is done the way it is because that was the decision made at the time (see #9). This was okay until the MS DI breaking change complicated matters.
LibLog does look interesting; thanks for pointing that out to me. Give us 24 hours or so to think this over. @RabebOthmani any thoughts?
I'm using Nexmo Client 3.2.2 and still getting #72 : "System.TypeInitializationException: The type initializer for 'Nexmo.Api.Configuration' threw an exception. ---> System.MissingMethodException: Method not found: 'System.Collections.Generic.Dictionary`2<System.String,System.Object> Microsoft.Extensions.Configuration.IConfigurationBuilder.get_Properties()'." How can I work around this issue?
Hi @pbelo , Could you please provide more details about your code and environment? Thanks
It'd be great to be able to drop the usage of DI, logging and configuration dependencies.
Right now I'm hitting #72, and looking at that thread it looks like you'd be open for changing this.
For logging what is used often is LibLog (https://github.com/damianh/LibLog). For configuration, just allowing an easy way to set things up would allow removal of the dependencies too.
It might make this easier to maintain and support too, as the library would become more stripped down, just focusing on accepting a configuration object and executing the requests correctly.
If you'd be interested in this let me know, I'll happily do the work as it'd mean we can use this library instead of our own custom implementation.