You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public event KeyValueEventHandler<T, string> OnAdd;
public event KeyValueEventHandler<T, string> OnChange;
public event KeyValueEventHandler<T, string> OnRemove;
MapSchema uses string then T everwhere except for these events. Because of this inversion, it means we can't just directly call handlers for these events with other MapSchema methods, like ForEach, so you end up having to write mapSchemaInstance.Foreach((key, t) => OnAdd(t, key)) instead of a nicer mapSchemaInstance.Foreach(OnAdd)
I know it's a breaking chance, but it would just be more coherent and help with readability (I haven't checked other collections, may need to update them as well)
The text was updated successfully, but these errors were encountered:
MapSchema uses
string
thenT
everwhere except for these events. Because of this inversion, it means we can't just directly call handlers for these events with other MapSchema methods, like ForEach, so you end up having to writemapSchemaInstance.Foreach((key, t) => OnAdd(t, key))
instead of a nicermapSchemaInstance.Foreach(OnAdd)
I know it's a breaking chance, but it would just be more coherent and help with readability (I haven't checked other collections, may need to update them as well)
The text was updated successfully, but these errors were encountered: