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
{{ message }}
Repository navigation
Make sure we support IList<T>, not just array/List<T> #3082
@roji, I just noticed this issue and even though I do not know what it is about exactly, I think it is in a similar area as my suggestion #2577.
I understand however if this is completely out of scope. As a short summary:
Although allowing IList would already solve my biggest issue with: CA1002: Do not expose generic lists.
I am assuming the actually instantiated type would default to List. And could not be overriden / configured?
My request was (at least conceptually) about allowing any list-type, like ObservableCollection.
Or ImmutableList, which would require to loosen the required interface even further from IList to IReadOnlyList
Of course "npgsql" can not support instantiating any list-type and types not implementing new(), new(int capacity), ICollection.Add, etc. - like ImmutableList - require special instantiation anyway.
Preferably this could be configured through HasPostgresArrayConversion (with where TProperty : IReadOnlyList<TElementProperty>).
Although of course this is already possible with INpgsqlArrayConverter and is a good enough solution.
Activity
sethzollinger commentedon Jun 18, 2024
@roji, I just noticed this issue and even though I do not know what it is about exactly, I think it is in a similar area as my suggestion #2577.
I understand however if this is completely out of scope. As a short summary:
Although allowing
IListwould already solve my biggest issue with: CA1002: Do not expose generic lists.I am assuming the actually instantiated type would default to
List. And could not be overriden / configured?My request was (at least conceptually) about allowing any list-type, like
ObservableCollection.Or
ImmutableList, which would require to loosen the required interface even further fromIListtoIReadOnlyListOf course "npgsql" can not support instantiating any list-type and types not implementing
new(),new(int capacity),ICollection.Add, etc. - likeImmutableList- require special instantiation anyway.Preferably this could be configured through
HasPostgresArrayConversion(withwhere TProperty : IReadOnlyList<TElementProperty>).Although of course this is already possible with
INpgsqlArrayConverterand is a good enough solution.Thank you for your time.