And the Useless Constructor Overload Award goes to... #6763
Labels
bug
Indicates an unexpected problem or an unintended behavior.
needs-triage
The issue has just been created and it has not been reviewed by the team.
Version
Bot Framework DotNet SDK 4.22.2
Describe the bug
The constructor for a
TeamsChannelAccount
object has two overloads, both filled with optional parameters. The combination of these constructors means that, in practice, NONE (or perhaps only one) of the parameters are actually optional.To Reproduce
TeamsChannelAccount
object by only passing in anid
value (first parameter).Expected behavior
Since all parameters are optional, I would expect to be able to pass in 1, 2, 3, 4, 5, 6, 7 or 8 parameters and have a successful build.
Additional context
See overloads in
libraries/Microsoft.Bot.Schema/Teams/TeamsChannelAccount.cs
. The constructor in lines 45-58 is completely superfluous and can only cause problems - unless there's some secret understanding I'm missing?The text was updated successfully, but these errors were encountered: