jamesmontemagno / SettingsPlugin

Read and Write Settings Plugin for Xamarin and Windows
MIT License
324 stars 80 forks source link

fixed boxing/unboxing during storing/retrieving data #113

Closed AndreiMisiukevich closed 6 years ago

AndreiMisiukevich commented 6 years ago

I noticed, that objects are boxing and unboxing every call. I think, it would be better to avoid it.

(My PR includes changes with fox only for iOS, validate it pls) If you think so too, that it's OK idea, I will be able to refactor Android's project too.

Also, I removed redundant code (I mean checking type for Nullable, because now this plugin supports only determined count of primitives.)

PR Checklist

AndreiMisiukevich commented 6 years ago

@jamesmontemagno What do you think about it?

jamesmontemagno commented 6 years ago

Too risky of a change for me. Sorry.

AndreiMisiukevich commented 6 years ago

@jamesmontemagno hm, it's your right, but if your afraid of these changes In this case we could preserve TypeCheck code (I mean the point below) \/ \/ "Also, I removed redundant code (I mean checking type for Nullable, because now this plugin supports only determined count of primitives.)" /\ /\

But, I think, the plugin should avoid boxing/unboxing for valuetypes.