Repository navigation
Conversation
Added proper XML documentation for the Add(object) method to clearly describe its behavior - that it adds the parameter to the collection and returns the zero-based index of the newly added parameter.
roji
left a comment
There was a problem hiding this comment.
I personally don't think there's much value in this doc change - anyone accidentally passing in a non-NpgsqlParameter gets a very clear InvalidCastException, corrects their code and then never hits this again. So it's one of those cases where it's somewhat academic.
But see below for concrete suggestions.
| => IndexOf(Cast(value)); | ||
|
|
||
| /// <inheritdoc /> | ||
| /// <summary> |
There was a problem hiding this comment.
If we want to make this change for Add, we should also do it for the other functions here which accept object and throw if it's not an NpgsqlParameter.
Also, I'd tweak the message to make it clear that although the function accepts object, it throws if a non-NpgsqlParameter is passed in (rather than "Adds the specified NpgsqlParameter...", which doesn't make that very clear).
|
@Nonanti are you still interested in adding the docs to the other methods? |
|
Closing due to being superseded by #6342 |
Added proper XML documentation for the Add(object) method to clearly describe its behavior - that it adds the parameter to the collection and returns the zero-based index of the newly added parameter.