Here is info about our technical development environment :
• Microsoft Visual Studio 2022
• .NET 6.0
• C# 10
• Serilog
• Serilog.Sinks.Datadog.Logs
• Serilog.Sinks.PeriodicBatching
I created an Adapter class called SerilogAdapter Class Library(Essentially, based on the Adapter Design Pattern) that will wrap some functionality provided by the 3rd-party Open Source Serilog API modules.
The SerilogAdapter builds properly, and creates a SerilogAdapter.dll file.
Furthermore, we are able to create a Nuget package out of our company’s Nexus Server
At work, there are a number of different Client Solution that will reference the SerilogAdapter as a package Nuget reference in order to use the SerilogAdapter within client code.
However, the problem is that even in the Client Solutions, I had to strangely also add the dlls for the following:
• Serilog
• Serilog.Sinks.Datadog.Logs
• Serilog.Sinks.PeriodicBatching
Isn’t there a way to modify the SerilogAdapter Class Library solution in such a way that it includes the following
• Serilog
• Serilog.Sinks.Datadog.Logs
• Serilog.Sinks.PeriodicBatching
within it’s SerilogAdapter.dll when it’s built and packaged into a nuget package? If yes, could someone please explain how I can go about modifying the SerilogAdapter Class Library solution to do so?
Essentially, I’m trying to adhere to principles of Encapsulation & Information Hiding. In other words, I wanted to completely decouple my companies Client Solutions from the 3rd-party Open Source Serilog API modules. The companies Client Solutions should Only reference the SerilogAdapter class library package.
Could someone please explain how I can go about implementing said SerilogAdapter class library in order to accomplish the aforementioned goal?