wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
340 stars 130 forks source link

GetAllAsync Bugfix & ref removal #289

Closed ThomasPe closed 2 years ago

ThomasPe commented 2 years ago

I've re-evaluated the ref construct for passing the HttpHelper to all sub-clients and didn't find a reason to keep it. This also allowed me to do all the SubClient initialization in a separate method to remove code duplication.

When testing this I also encountered a serious bug with the GetAllAsync method that doesn't work properly with 102+ items.

@navjot50 any thoughts or concerns?

navjot50 commented 2 years ago

Yes @ThomasPe , at first glance of the codebase I also had the same opinion that ref can be omitted. I am using Rider which gives Resharper refactoring for the code. Should I issue a PR for these minor refactorings suggested by the IDE?

ThomasPe commented 2 years ago

would be interesting to see what Rider suggests, sure.