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
I forked MonoGame.Extended for net10. I rewrote certain parts of the code.
One class that I liked a lot and rewrote is Bag.
I noticed that it did not implement a System.Collection interface, and that the class did not correspond to the standard of a collection.
For example the Reset method of the enumerator neither throws nor resets.
That it is possible to index an element at an index greater than Count which (if of a primitive generic type) preserves the values from before a Clear.
I rewrote all of that and added documentation. I forked a specific branch for the Bag class https://github.com/warquys/MonoGame.Extended/tree/Bag, in case that can interest you.
I did not create a pull request because these modifications contain multiple breaking changes.
However, I can modify the current branch code to remove them.
The breaking changes are:
Enumeration throws if the collection is modified during enumeration
The collection throws if the index is greater than Count during a modification by index.
RemoveAt throws if the index is greater than Count.
BagEnumerator.Reset throws NotSupportedException
The class now implements ICollection, IList, IReadOnlyCollection, IReadOnlyList, ICollection and IList.
For the messages in the Exceptions I used those that are thrown by List.
If you are interested in these changes, please let me know in this discussion. If any other changes are needed, I will make them.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I forked MonoGame.Extended for net10. I rewrote certain parts of the code.
One class that I liked a lot and rewrote is Bag.
I noticed that it did not implement a System.Collection interface, and that the class did not correspond to the standard of a collection.
For example the Reset method of the enumerator neither throws nor resets.
That it is possible to index an element at an index greater than Count which (if of a primitive generic type) preserves the values from before a Clear.
I rewrote all of that and added documentation. I forked a specific branch for the Bag class https://github.com/warquys/MonoGame.Extended/tree/Bag, in case that can interest you.
I did not create a pull request because these modifications contain multiple breaking changes.
However, I can modify the current branch code to remove them.
The breaking changes are:
The class now implements ICollection, IList, IReadOnlyCollection, IReadOnlyList, ICollection and IList.
For the messages in the Exceptions I used those that are thrown by List.
If you are interested in these changes, please let me know in this discussion. If any other changes are needed, I will make them.
Beta Was this translation helpful? Give feedback.
All reactions