Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate SearchableList#data#set() #293

Open
shpaass opened this issue Sep 16, 2024 · 4 comments
Open

Investigate SearchableList#data#set() #293

shpaass opened this issue Sep 16, 2024 · 4 comments
Labels
todo This ticket has a corresponding TODO in the code

Comments

@shpaass
Copy link
Owner

shpaass commented Sep 16, 2024

VS says it violates CA1061.
Writing it down here to not forget.

@shpaass
Copy link
Owner Author

shpaass commented Sep 19, 2024

From what I understand, the VS's complaint is based on the following:

  • SearchableList is a child of VirtualScrollList
  • VirtualScrollList has a property public IReadOnlyList data, which has set.
  • SearchableList has public IEnumerable data, which is less specific than IReadOnlyList, and which also has set.

@shpaass
Copy link
Owner Author

shpaass commented Sep 19, 2024

In other words, data.set(IEnumerable) hides data.set(IReadOnlyList)

@shpaass
Copy link
Owner Author

shpaass commented Sep 19, 2024

It was fun to read CA1061:
Question: When to hide this warning?
Answer: Don't.

@shpaass
Copy link
Owner Author

shpaass commented Sep 19, 2024

I'll stew on this info for a bit. Feel free to post your takes on what we should do with this situation.

@shpaass shpaass added the todo This ticket has a corresponding TODO in the code label Sep 20, 2024
@shpaass shpaass changed the title [Todo] Investigate SearchableList#data#set() Investigate SearchableList#data#set() Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo This ticket has a corresponding TODO in the code
Projects
None yet
Development

No branches or pull requests

1 participant