SteveWinward / GoogleSheetsWrapper

Google Sheets API .NET Wrapper Library
MIT License
48 stars 13 forks source link

Change List<T> to IList<T> to also support arrays. #10

Closed Monsoonexe closed 2 years ago

Monsoonexe commented 2 years ago

Sometimes you have an array of Records but want to avoid converting to List. Some functions already supported arrays through IList, so I updated the remaining methods that only supported List.

I changed some instances where a single-element List was created to send a single request, and changed the List to an array instead. While profiling the project I'm working on, I noticed these allocations can add up.

In addition, I used the List(int capacity) constructor over the default constructor when the size of the list was known.

SteveWinward commented 2 years ago

Thanks for the contribution! Updated the nuget release to 1.0.33.

Monsoonexe commented 2 years ago

Thank you!

On Wed, May 18, 2022 at 9:30 PM Steve Winward @.***> wrote:

Thanks for the contribution! Updated the nuget release to 1.0.33.

— Reply to this email directly, view it on GitHub https://github.com/SteveWinward/GoogleSheetsWrapper/pull/10#issuecomment-1131190013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNKVBJAWABHZQKYA5K2N73VKW7X7ANCNFSM5WKHBCTA . You are receiving this because you authored the thread.Message ID: @.***>