Skip to content

SvgElementCollection tests added; Insert now handles case when index==Count#1201

Merged
mrbean-bremen merged 3 commits intosvg-net:masterfrom
jlidbeck:feature/SvgElementCollection-tests
Feb 6, 2026
Merged

SvgElementCollection tests added; Insert now handles case when index==Count#1201
mrbean-bremen merged 3 commits intosvg-net:masterfrom
jlidbeck:feature/SvgElementCollection-tests

Conversation

@jlidbeck
Copy link
Copy Markdown
Contributor

@jlidbeck jlidbeck commented Feb 5, 2026

Fixes #1200: SvgElementCollection.Insert throws exception when index==count.

According to IList documentation, in this case the expected behavior is that the element is added to the end of the list. A minor fix was made to the SvgElementCollection internals to match this behavior.

Unit tests were added to verify insert/remove behavior.

Copy link
Copy Markdown
Member

@mrbean-bremen mrbean-bremen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you please add an entry to the release notes?

Copy link
Copy Markdown
Member

@mrbean-bremen mrbean-bremen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mrbean-bremen mrbean-bremen merged commit 6959132 into svg-net:master Feb 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SvgElement.Children.Insert fails to add an element to the end

2 participants