SolidAlloy / SolidUtilities

Different utilities that simplify development in Unity3D.
Other
30 stars 20 forks source link

feat: SerializableDictionary implements IReadOnlyDictionary<TKey, TValue> #6

Open afti-githobo opened 1 year ago

afti-githobo commented 1 year ago

I like to use IReadOnlyDictionary types when passing around dictionaries that shouldn't be modified by the code that's receiving them, but SerializableDictionary didn't implement the interface. It was, however, a very minor addition, so I just went ahead and did that.

I... haven't done a lot of open-source contributions in the past, tbh, so I hope I haven't done anything wrong and I'm not stepping on any toes?

Anyway, the code should be pretty self-explanatory; I didn't really have to do much of anything to implement the interface. Just a small quality-of-life improvement for using the collection in certain programming patterns.