I have drawing application, in which user can work on multiple drawings at same time. Lets say a user has opened 4 drawings on -> top left, top right, bottom left and bottom right respectively.
Previously, I had a static settings file and all the 4 drawings were using the same settings. Now I need to implement different settings file for all the 4 drawings. So user can have different tolerances in different drawings. The settings are read from Json.
If I create a settings() object then I will have to pass it to every variable which needs the value from settings.
Previously, I could just do
var dim = Settings.Tolerance;
This is making the program really ugly and I am forced to pass settings in every function from top to bottom and also extension methods.
Is there any thing I can do to avoid this?
I am implementing this in C# , .net core.