Skip to content

Conversation

@jenscski
Copy link
Contributor

Description of Change

Added check that enumerator is disposable before calling dispose, allowing support for ArrayEnumerator

Linked Issues

PR Checklist

Additional information

Modified IsListNotNullOrEmptyConverterTests:
- Empty List<string> now returns true.
- Added empty array (Array.Empty<string>()) returning true.
- List<string> with "TestValue" now returns false.
- Null value now returns true.
- Enumerable.Range(1, 3) now returns false.

Added new test cases:
- Empty array (Array.Empty<string>()) returning true.
- Array with "TestValue" returning false.

Updated IsListNullOrEmpty method:
- Check if enumerator is IDisposable before disposing.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) December 19, 2024 18:05
@TheCodeTraveler TheCodeTraveler merged commit 1d89461 into CommunityToolkit:main Dec 19, 2024
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] IsListNullOrEmptyConverter fails when parameter is an array

4 participants