09-18-2023, 12:07 AM
Hello.
I just noticed a serious problem in Curvy's code.
I contains extension methods which are considered as "non-best-practice" and these method leaks into our project code via VisualStudio's IntelliSense because they are declared as public.
In .NET world (or at least, in C# world) we don't/should not use resizable Arrays. When we need resizing, we use List<> generic collection.
I see that Curvy contains extension methods (Add and AddRange) which resize an array. You may decide what to use and not to use in your own code. That's fine but declaring this non-best-practice as public and leaking it into customer code is a serious problem.
I almost committed the usage of these public methods into our project repo. I just noticed the problem at the last second before committing.
As can be seen in the screenshot, SettlementBuildingOptions is a string array and VS IntelliSense is showing your non-best-practice Add and AddRange methods as suggestions. This can lead to programmer errors on our end.
Can you please reduce the accessibility of those methods to Internal or Private according to your usage please?
-- Last Second Edit --
I just checked. You don't even use these methods privately. Why are you pushing these extension methods into your customers' code?
Please don't tell me to manually modify the accessibility of these methods in your code. Doing so would make my 3rd party maintenance job very hard in the future.
I just noticed a serious problem in Curvy's code.
I contains extension methods which are considered as "non-best-practice" and these method leaks into our project code via VisualStudio's IntelliSense because they are declared as public.
In .NET world (or at least, in C# world) we don't/should not use resizable Arrays. When we need resizing, we use List<> generic collection.
I see that Curvy contains extension methods (Add and AddRange) which resize an array. You may decide what to use and not to use in your own code. That's fine but declaring this non-best-practice as public and leaking it into customer code is a serious problem.
I almost committed the usage of these public methods into our project repo. I just noticed the problem at the last second before committing.
As can be seen in the screenshot, SettlementBuildingOptions is a string array and VS IntelliSense is showing your non-best-practice Add and AddRange methods as suggestions. This can lead to programmer errors on our end.
Can you please reduce the accessibility of those methods to Internal or Private according to your usage please?
-- Last Second Edit --
I just checked. You don't even use these methods privately. Why are you pushing these extension methods into your customers' code?
Please don't tell me to manually modify the accessibility of these methods in your code. Doing so would make my 3rd party maintenance job very hard in the future.